repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Web/WEBSERVICE.php | tests/data/Calculation/Web/WEBSERVICE.php | <?php
declare(strict_types=1);
return [
[
'#VALUE!',
'http://www.thisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolorthisurlisfartoolongLoremipsumdolorsitametconsecteturadipiscingelitAliquamimperdietmetusurnasedaliquampurusdapibusefficiturQuisqueatullamcorpermaurisacmattisanteDonecsagittisauguenullaegeinterduurnapharetrautQuisquealectusvelnisivolutpatpharetraSuspendisseconvallisvulputateblanditClassaptenttacitisociosquadlitoratorquentperconubianostraperinceptoshimenaeosProinjustdiampulvinaracjustoauctorimperdietsuscipitestEtiamacmaximusmassasitametvulputatedolor.com',
],
[
'#VALUE!',
'ftp://www.bla.com',
],
[
'Example Domain',
'http://www.example.com',
],
[
'#VALUE!',
'http://www.invalid.com',
],
[
'Example Domain',
'https://www.example.com',
],
'reply too long' => [
'#VALUE!',
'https://www.google.com/search?q=hello',
],
[
'Example Domain',
'Z1',
],
[
'#VALUE!',
'Z2',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2BIN.php | tests/data/Calculation/Engineering/HEX2BIN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['11111111', 'FF'],
['111111111', '1FF'],
[ExcelError::NAN(), '200'],
['1000000000', 'FFFFFFFE00'], // 2's Complement
[ExcelError::NAN(), 'FFFFFFFDFF'], // 2's Complement
['111111111', '01FF'], // highest positive
[ExcelError::NAN(), '0200'],
['1000000000', 'FFFFFFFE00'], // lowest negative
[ExcelError::NAN(), 'FFFFFFFDFF'],
['110101011', '01AB'],
[ExcelError::NAN(), 'ABCD'],
['11110110', 'F6'],
['00001111', 'F', 8],
['10110111', 'B7'],
[ExcelError::NAN(), '12345'],
[ExcelError::NAN(), '123456789'],
[ExcelError::NAN(), '123.45'],
['0', '0'],
[ExcelError::NAN(), 'G3579A'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
['01010', 'A', 5],
[ExcelError::NAN(), 'A', 0],
[ExcelError::NAN(), 'A', -1],
[ExcelError::NAN(), 'A', 14],
[ExcelError::NAN(), 'A', 3],
['1010', 'A', 4],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCOT.php | tests/data/Calculation/Engineering/IMCOT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'-0.0000104004141424230319-1.00002138037057154j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'0.00894394174578834370-1.01017158348808170i',
'3.5+2.5i',
],
[
'0.218391793398543914-1.20562055667579681i',
'3.5+i',
],
[
'2.66961648496886604',
'3.5',
],
[
'0.218391793398543914+1.20562055667579681i',
'3.5-i',
],
[
'0.00894394174578834370+1.01017158348808170i',
'3.5-2.5i',
],
[
'0.0121847112919806296-0.994333285407756555i',
'1+2.5i',
],
[
'0.217621561854402681-0.868014142895924949i',
'1+i',
],
[
'0.642092615934330703',
'1',
],
[
'0.217621561854402681+0.868014142895924949i',
'1-i',
],
[
'0.0121847112919806296+0.994333285407756555i',
'1-2.5i',
],
[
'-1.01356730981260846i',
'2.5i',
],
[
'-1.31303528549933130i',
'i',
],
[
INF,
'0',
],
[
'1.31303528549933130i',
'-i',
],
[
'1.013567309812609i',
'-2.5i',
],
[
'-0.01218471129198063-0.994333285407757i',
'-1+2.5i',
],
[
'-0.21762156185440268-0.8680141428959249i',
'-1+i',
],
[
'-0.642092615934330703',
'-1',
],
[
'-0.21762156185440268+0.8680141428959249i',
'-1-i',
],
[
'-0.01218471129198063+0.994333285407757i',
'-1-2.5i',
],
[
'-0.00894394174578834-1.010171583488082i',
'-3.5+2.5i',
],
[
'-0.2183917933985438-1.205620556675797i',
'-3.5+i',
],
[
'-2.66961648496886604',
'-3.5',
],
[
'-0.2183917933985438+1.205620556675797i',
'-3.5-i',
],
[
'-0.00894394174578834+1.010171583488082i',
'-3.5-2.5i',
],
[
'-7.01525255143453347',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2DECOpenOffice.php | tests/data/Calculation/Engineering/BIN2DECOpenOffice.php | <?php
declare(strict_types=1);
return [
[1, true], // Boolean okay for ODS, not for Excel/Gnumeric
[0, false], // Boolean okay for ODS, not for Excel/Gnumeric
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMPRODUCT.php | tests/data/Calculation/Engineering/IMPRODUCT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
ExcelError::NAN(),
'12.34+5.67j',
'123.45+67.89i',
],
[
ExcelError::NAN(),
'12.34+5.67j',
'Invalid Complex Number',
],
[
'12.34+5.67j',
'12.34+5.67j',
],
[
'6454.936089+8718.895647i',
'12.34+5.67i',
'123.45+67.89i',
'5.67',
],
[
'6454.936089+8718.895647j',
'12.34+5.67j',
'123.45+67.89j',
'5.67',
],
[
'1138.4367+1537.7241j',
'12.34+5.67j',
'123.45+67.89j',
],
[
'1908.3093+137.8011i',
'12.34-5.67i',
'123.45+67.89i',
],
[
'1908.3093-137.8011i',
'12.34+5.67i',
'123.45-67.89i',
],
[
'1138.4367-1537.7241i',
'12.34-5.67i',
'123.45-67.89i',
],
[
'-1908.3093-137.8011i',
'-12.34+5.67i',
'123.45+67.89i',
],
[
'-1138.4367-1537.7241i',
'-12.34-5.67i',
'123.45+67.89i',
],
[
'-1908.3093+137.8011i',
'12.34+5.67i',
'-123.45+67.89i',
],
[
'1138.4367-1537.7241i',
'-12.34+5.67i',
'-123.45+67.89i',
],
[
'1138.4367+1537.7241i',
'-12.34-5.67i',
'-123.45-67.89i',
],
[
'-1523.373+837.7626i',
'-12.34',
'123.45-67.89i',
],
[
'152.2756+69.9678i',
'-12.34-5.67i',
'-12.34',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMLOG2.php | tests/data/Calculation/Engineering/IMLOG2.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'3.76344325733562+0.621384040306436j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'32.6586381298614+2.26618007108803i',
'-12.34E-5+6.78E9i',
],
[
'2.10472668297646+0.894830857610216i',
'3.5+2.5i',
],
[
'1.86396022742506+0.401501537958665i',
'3.5+i',
],
[
'1.80735492219671',
'3.5',
],
[
'1.86396022742506-0.401501537958665i',
'3.5-i',
],
[
'2.10472668297646-0.894830857610216i',
'3.5-2.5i',
],
[
'1.42899049767377+1.71722540775913i',
'1+2.5i',
],
[
'0.500000000038482+1.13309003554401i',
'1+i',
],
[
'0',
'1',
],
[
'0.500000000038482-1.13309003554401i',
'1-i',
],
[
'1.42899049767377-1.71722540775913i',
'1-2.5i',
],
[
'1.3219280949891+2.26618007108801i',
'2.5i',
],
[
'2.26618007108801i',
'i',
],
[
ExcelError::NAN(),
'0',
],
[
'-2.26618007108801i',
'-i',
],
[
'1.3219280949891-2.26618007108801i',
'-2.5i',
],
[
'1.42899049767377+2.81513473441689i',
'-1+2.5i',
],
[
'0.500000000038482+3.39927010663201i',
'-1+i',
],
[
'4.53236014217602i',
'-1',
],
[
'0.500000000038482-3.39927010663201i',
'-1-i',
],
[
'1.42899049767377-2.81513473441689i',
'-1-2.5i',
],
[
'2.10472668297646+3.63752928456581i',
'-3.5+2.5i',
],
[
'1.86396022742506+4.13085860421736i',
'-3.5+i',
],
[
'1.80735492219671+4.53236014217602i',
'-3.5',
],
[
'1.86396022742506-4.13085860421736i',
'-3.5-i',
],
[
'2.10472668297646-3.63752928456581i',
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BITAND.php | tests/data/Calculation/Engineering/BITAND.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[5, 21, 39],
[64, 200, '84'],
[8, 72.00, 184.00],
[ExcelError::VALUE(), 'ABC', 'DEF'],
[ExcelError::VALUE(), 1, 'DEF'],
[ExcelError::VALUE(), 'ABC', 1],
[ExcelError::NAN(), 12.00, 2.82E14],
[5123456789, 5123456789, 5123456789],
[4831908629, 5123456789, 7123456789],
[21, 5123456789, 31],
[ExcelError::NAN(), -5123456788, 1],
[ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48
[ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48
[ExcelError::NAN(), -2, 1], // negative argument
[ExcelError::NAN(), 2, -1], // negative argument
[ExcelError::NAN(), -2, -1], // negative argument
[ExcelError::NAN(), 3.1, 1], // non-integer argument
[ExcelError::NAN(), 3, 1.1], // non-integer argument
[0, 4, null],
[0, 4, false],
[1, 3, true],
[0, null, 4],
[0, false, 4],
[1, true, 5],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCOSH.php | tests/data/Calculation/Engineering/IMCOSH.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'93502.0563713182121-65794.6618967782119j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-13.2772126767962807+9.90030162194353525i',
'3.5+2.5i',
],
[
'8.95433538452066202+13.9201408750362033i',
'3.5+i',
],
[
'16.5728246710573161',
'3.5',
],
[
'8.95433538452066202-13.9201408750362033i',
'3.5-i',
],
[
'-13.2772126767962807-9.90030162194353525i',
'3.5-2.5i',
],
[
'-1.23622919885634208+0.703325178113534826i',
'1+2.5i',
],
[
'0.833730025131149049+0.988897705762865096i',
'1+i',
],
[
'1.54308063481524378',
'1',
],
[
'0.833730025131149049-0.988897705762865096i',
'1-i',
],
[
'-1.23622919885634208-0.703325178113534826i',
'1-2.5i',
],
[
'-0.801143615546933715',
'2.5i',
],
[
'0.540302305868139717',
'i',
],
[
'1',
'0',
],
[
'0.540302305868139717',
'-i',
],
[
'-0.801143615546933715',
'-2.5i',
],
[
'-1.23622919885634208-0.703325178113534826i',
'-1+2.5i',
],
[
'0.833730025131149049-0.988897705762865096i',
'-1+i',
],
[
'1.54308063481524378',
'-1',
],
[
'0.833730025131149049+0.988897705762865096i',
'-1-i',
],
[
'-1.23622919885634208+0.703325178113534826i',
'-1-2.5i',
],
[
'-13.2772126767962807-9.90030162194353525i',
'-3.5+2.5i',
],
[
'8.95433538452066202-13.9201408750362033i',
'-3.5+i',
],
[
'16.5728246710573161',
'-3.5',
],
[
'8.95433538452066202+13.9201408750362033i',
'-3.5-i',
],
[
'-13.2772126767962807+9.90030162194353525i',
'-3.5-2.5i',
],
[
'10.0676619957777658',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BESSELY.php | tests/data/Calculation/Engineering/BESSELY.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[ExcelError::NAN(), 1.5, -1],
[ExcelError::VALUE(), 'NaN', 1],
[ExcelError::VALUE(), 1.5, 'NaN'],
[ExcelError::NAN(), -1.5, 1],
[ExcelError::NAN(), 0.0, 1],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1.5, true],
[ExcelError::VALUE(), null, 1],
[ExcelError::VALUE(), 1.5, null],
[-1.38968063456627, 0.125, 0],
[0.088256971397708, 1, 0],
[0.498070358446689, 2.5, 0],
[0.189021944512578, 3.5, 0],
[0.223521489249681, 8, 0],
[-0.171214306884316, 12.5, 0],
[0.119887597856641, 22, 0],
[-0.028742484734472, 32, 0],
[-5.19993610955387, 0.125, 1],
[-0.78121282095312, 1, 1],
[0.145918137508313, 2.5, 1],
[0.410188416627698, 3.5, 1],
[-0.158060461835146, 8, 1],
[-0.153838256351639, 12.5, 1],
[0.123405856078544, 22, 1],
[-0.138544831448816, 32, 1],
[-81.8092971182956, 0.125, 2],
[-1.65068261330395, 1, 2],
[-0.381335848440038, 2.5, 2],
[0.045371436417535, 3.5, 2],
[-0.263036604708467, 8, 2],
[0.146600185868054, 12.5, 2],
[-0.108668883667682, 22, 2],
[0.020083432768921, 32, 2],
[-8018358.447601137, 0.125, 5],
[-260.405867809914, 1, 5],
[-3.83017599167454, 2.5, 5],
[-1.14946031467642, 3.5, 5],
[0.256401064838239, 8, 5],
[-0.232903937762173, 12.5, 5],
[0.16848172635078, 22, 5],
[-0.139464153399118, 32, 5],
[-0.444518733762708, 0.5, 0.5],
[-1.47147239186729, 0.5, 1.5],
[-42.0594942777845, 0.5, 3.5],
[0.077260138596538, 64, 8],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCSC.php | tests/data/Calculation/Engineering/IMCSC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'-0.00154774455592154432-0.00671986631601416928j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-0.0585684747824233590+0.154262439469903774i',
'3.5+2.5i',
],
[
'-0.359863036667298479+0.731660683934045561i',
'3.5+i',
],
[
'-2.85076343754046413',
'3.5',
],
[
'-0.359863036667298479-0.731660683934045561i',
'3.5-i',
],
[
'-0.0585684747824233590-0.154262439469903774i',
'3.5-2.5i',
],
[
'0.138293277776215018-0.0876084810883255787i',
'1+2.5i',
],
[
'0.621518017170428421-0.303931001628426450i',
'1+i',
],
[
'1.18839510577812122',
'1',
],
[
'0.621518017170428421+0.303931001628426450i',
'1-i',
],
[
'0.138293277776215018+0.0876084810883255787i',
'1-2.5i',
],
[
'-0.165283669855095565i',
'2.5i',
],
[
'-0.850918128239321545i',
'i',
],
[
INF,
'0',
],
[
'0.850918128239321545i',
'-i',
],
[
'0.1652836698550956i',
'-2.5i',
],
[
'-0.138293277776215-0.0876084810883256i',
'-1+2.5i',
],
[
'-0.62151801717042842-0.30393100162842645i',
'-1+i',
],
[
'-1.18839510577812122',
'-1',
],
[
'-0.62151801717042842+0.30393100162842645i',
'-1-i',
],
[
'-0.138293277776215+0.0876084810883256i',
'-1-2.5i',
],
[
'0.05856847478242335+0.1542624394699038i',
'-3.5+2.5i',
],
[
'0.3598630366672985+0.7316606839340456i',
'-3.5+i',
],
[
'2.85076343754046413',
'-3.5',
],
[
'0.3598630366672985-0.7316606839340456i',
'-3.5-i',
],
[
'0.05856847478242335-0.1542624394699038i',
'-3.5-2.5i',
],
[
'7.08616739573718592',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BITRSHIFT.php | tests/data/Calculation/Engineering/BITRSHIFT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[5.0, 20, 2],
[3.0, 52, '4'],
[ExcelError::VALUE(), 'ABC', 5],
[ExcelError::VALUE(), 5, 'ABC'],
[ExcelError::NAN(), 1, -48], // result too large
[ExcelError::NAN(), 1.1, 2], // first arg must be integer
[1.0, 4, 2.1], // second arg will be truncated
[ExcelError::NAN(), 0, 54], // second arg too large
[0.0, 0, 5],
[ExcelError::NAN(), -16, 2], // first arg cant be negative
[4.0, 1, -2], // negative shift permitted
[4.0, 1, -2.1], // negative shift and (ignored) fraction permitted
[4.0, 4, null],
[4.0, 4, false],
[2.0, 4, true],
[0.0, null, 4],
[4.0, 4, false],
[2.0, 4, true],
[0.0, false, 4],
[0.0, true, 4],
[16.0, true, -4],
[8000000000.0, 1000000000, -3], // result > 2**32
[8000000000.0, 16000000000, 1], // argument > 2**32
[ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48
[1.0, 2 ** 47, 47],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSECH.php | tests/data/Calculation/Engineering/IMSECH.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'7.15308425036177674E-6+5.03341614116724074E-6j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-0.0484039219824442559-0.0360929239424409676i',
'3.5+2.5i',
],
[
'0.0326859677559519711-0.0508126238588615047i',
'3.5+i',
],
[
'0.0603397441201676464',
'3.5',
],
[
'0.0326859677559519711+0.0508126238588615047i',
'3.5-i',
],
[
'-0.0484039219824442559+0.0360929239424409676i',
'3.5-2.5i',
],
[
'-0.611108564155231518-0.347676660710495997i',
'1+2.5i',
],
[
'0.498337030555186785-0.591083841721045048i',
'1+i',
],
[
'0.648054273663885400',
'1',
],
[
'0.498337030555186785+0.591083841721045048i',
'1-i',
],
[
'-0.611108564155231518+0.347676660710495997i',
'1-2.5i',
],
[
'-1.24821565146881783',
'2.5i',
],
[
'1.85081571768092562',
'i',
],
[
'1.0',
'0',
],
[
'1.85081571768092562',
'-i',
],
[
'-1.24821565146881783',
'-2.5i',
],
[
'-0.611108564155231518+0.347676660710495997i',
'-1+2.5i',
],
[
'0.498337030555186785+0.591083841721045048i',
'-1+i',
],
[
'0.648054273663885400',
'-1',
],
[
'0.498337030555186785-0.591083841721045048i',
'-1-i',
],
[
'-0.611108564155231518-0.347676660710495997i',
'-1-2.5i',
],
[
'-0.0484039219824442559+0.0360929239424409676i',
'-3.5+2.5i',
],
[
'0.0326859677559519711+0.0508126238588615047i',
'-3.5+i',
],
[
'0.0603397441201676464',
'-3.5',
],
[
'0.0326859677559519711-0.0508126238588615047i',
'-3.5-i',
],
[
'-0.0484039219824442559-0.0360929239424409676i',
'-3.5-2.5i',
],
[
'0.0993279274194332078',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BESSELJ.php | tests/data/Calculation/Engineering/BESSELJ.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[ExcelError::NAN(), 1.5, -1],
[ExcelError::VALUE(), 'NaN', 1],
[ExcelError::VALUE(), 1.5, 'NaN'],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1.5, true],
[ExcelError::VALUE(), null, 1],
[ExcelError::VALUE(), 1.5, null],
[0.146884054700421, -12.5, 0],
[-0.245935764451348, -10, 0],
[0.266339657880379, -7.5, 0],
[-0.380127739987264, -3.5, 0],
[-0.048383776468198, -2.5, 0],
[0.765197686557967, -1, 0],
[0.996097563041985, -0.125, 0],
[1.0, 0, 0],
[0.996097563041985, 0.125, 0],
[0.765197686557967, 1, 0],
[-0.048383776468198, 2.5, 0],
[-0.380127739987264, 3.5, 0],
[0.171650807137554, 8, 0],
[0.146884054700421, 12.5, 0],
[-0.120651475704867, 22, 0],
[0.138079009746556, 32, 0],
[0.165483804614760, -12.5, 1],
[-0.043472746168862, -10, 1],
[-0.135248427579706, -7.5, 1],
[-0.137377527362327, -3.5, 1],
[-0.497094102464274, -2.5, 1],
[-0.440050585744933, -1, 1],
[-0.062378009134495, -0.125, 1],
[0.0, 0, 1],
[0.062378009134495, 0.125, 1],
[0.440050585744933, 1, 1],
[0.497094102464274, 2.5, 1],
[0.137377527362327, 3.5, 1],
[0.234636346853915, 8, 1],
[-0.165483804614760, 12.5, 1],
[0.117177789643852, 22, 1],
[-0.026589028475905, 32, 1],
[-0.173361463438783, -12.5, 2],
[0.254630313685121, -10, 2],
[-0.230273410525790, -7.5, 2],
[0.458629184194308, -3.5, 2],
[0.446059058439617, -2.5, 2],
[0.114903484931900, -1, 2],
[0.001950583109930, -0.125, 2],
[0.0, 0, 2],
[0.001950583109930, 0.125, 2],
[0.114903484931900, 1, 2],
[0.446059058439617, 2.5, 2],
[0.458629184194308, 3.5, 2],
[-0.112991720424075, 8, 2],
[-0.173361463438783, 12.5, 2],
[0.131304002036127, 22, 2],
[-0.139740824026300, 32, 2],
[-0.034737699762240, -12.5, 5],
[0.234061528186794, -10, 5],
[-0.283473905162551, -7.5, 5],
[-0.080441986647992, -3.5, 5],
[-0.019501625134503, -2.5, 5],
[-0.000249757730211, -1, 5],
[-0.000000007942113, -0.125, 5],
[0.0, 0, 5],
[0.000000007942113, 0.125, 5],
[0.000249757730211, 1, 5],
[0.019501625134503, 2.5, 5],
[0.080441986647992, 3.5, 5],
[0.185774772190564, 8, 5],
[0.034737699762240, 12.5, 5],
[0.036304102444491, 22, 5],
[0.026241347352986, 32, 5],
[-0.002563729994587, -0.5, 3.5],
[-0.242268457674874, -0.5, 1.5],
[0.938469807240813, -0.5, 0.5],
[0.938469807240813, 0.5, 0.5],
[0.242268457674874, 0.5, 1.5],
[0.002563729994587, 0.5, 3.5],
[0.063689476134356, 64, 8],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMEXP.php | tests/data/Calculation/Engineering/IMEXP.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'187004.11273906-131589.323796073j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'0.519482808316086+0.85433649244115i',
'-12.34E-5+6.78E9i',
],
[
'-26.5302329126575+19.8186755366902i',
'3.5+2.5i',
],
[
'17.8923550531471+27.8656919720394i',
'3.5+i',
],
[
'33.1154519586923',
'3.5',
],
[
'17.8923550531471-27.8656919720394i',
'3.5-i',
],
[
'-26.5302329126575-19.8186755366902i',
'3.5-2.5i',
],
[
'-2.17773413212721+1.62681595415671i',
'1+2.5i',
],
[
'1.46869393991589+2.28735528717884i',
'1+i',
],
[
'2.71828182845905',
'1',
],
[
'1.46869393991589-2.28735528717884i',
'1-i',
],
[
'-2.17773413212721-1.62681595415671i',
'1-2.5i',
],
[
'-0.801143615546934+0.598472144103957i',
'2.5i',
],
[
'0.54030230586814+0.841470984807897i',
'i',
],
[
'1',
'0',
],
[
'0.54030230586814-0.841470984807897i',
'-i',
],
[
'-0.801143615546934-0.598472144103957i',
'-2.5i',
],
[
'-0.294724265585475+0.220165597929638i',
'-1+2.5i',
],
[
'0.198766110346413+0.309559875653112i',
'-1+i',
],
[
'0.367879441171442',
'-1',
],
[
'0.198766110346413-0.309559875653112i',
'-1-i',
],
[
'-0.294724265585475-0.220165597929638i',
'-1-2.5i',
],
[
'-0.0241924409350133+0.0180722928030842i',
'-3.5+2.5i',
],
[
'0.016315715894263+0.025410221967i',
'-3.5+i',
],
[
'0.0301973834223185',
'-3.5',
],
[
'0.016315715894263-0.025410221967i',
'-3.5-i',
],
[
'-0.0241924409350133-0.0180722928030842i',
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2HEXOpenOffice.php | tests/data/Calculation/Engineering/OCT2HEXOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts boolean, Excel/Gnumeric don't
['0', false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/COMPLEX.php | tests/data/Calculation/Engineering/COMPLEX.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['3+4i', 3, 4],
['3+4j', 3, 4, 'j'],
['12.34+5.67j', 12.34, 5.6699999999999999, 'j'],
[ExcelError::VALUE(), 3.5, 'NaN'],
[ExcelError::VALUE(), 'NaN', 3.5],
[ExcelError::VALUE(), 1.5, 3.5, 'invalid suffix'],
[ExcelError::VALUE(), 3.5, true],
[ExcelError::VALUE(), true, 3.5],
[ExcelError::VALUE(), 1.5, 3.5, true],
['1.234E-5+6780000000i', 1.234E-5, 6780000000.0],
['123400+6.78E-9i', 123400.0, 6.78E-9],
['3.5+2.5i', 3.5, 2.5],
['3.5+i', 3.5, 1],
['3.5-i', 3.5, -1],
['3.5-2.5i', 3.5, -2.5],
['1+2.5i', 1, 2.5],
['1+i', 1, 1],
['1', 1, 0],
['1-i', 1, -1],
['1-2.5i', 1, -2.5],
['2.5i', 0, 2.5],
['i', 0, 1],
['0.0', 0, 0],
['-i', 0, -1],
['-2.5i', 0, -2.5],
['-1+2.5i', -1, 2.5],
['-1+i', -1, 1],
['-1', -1, 0],
['-1-i', -1, -1],
['-1-2.5i', -1, -2.5],
['-3.5', -3.5, 0],
['-3.5-2.5i', -3.5, -2.5],
['-2.5-2.5i', -2.5, -2.5],
['-2.5-2.5i', -2.5, -2.5],
['-1.5-2.5i', -1.5, -2.5],
['-1.5-2.5i', -1.5, -2.5],
['-0.5-2.5i', -0.5, -2.5],
['-2.5i', 0, -2.5],
['0.5-2.5i', 0.5, -2.5],
['1-2.5i', 1, -2.5],
['1.5-2.5i', 1.5, -2.5],
['2-2.5i', 2, -2.5],
['2.5-2.5i', 2.5, -2.5],
['3-2.5i', 3, -2.5],
['3.5-2.5i', 3.5, -2.5],
['-2.5-2.5i', -2.5, -2.5],
['-1.5-2.5i', -1.5, -2.5],
['-0.5-2.5i', -0.5, -2.5],
['-2.5i', 0, -2.5],
['0.5-2.5i', 0.5, -2.5],
['1-2.5i', 1, -2.5],
['1.5-2.5i', 1.5, -2.5],
['2-2.5i', 2, -2.5],
['2.5-2.5i', 2.5, -2.5],
['3-2.5i', 3, -2.5],
['3.5-2.5i', 3.5, -2.5],
['-2.5-1.5i', -2.5, -1.5],
['-1.5-1.5i', -1.5, -1.5],
['-0.5-1.5i', -0.5, -1.5],
['-1.5i', 0, -1.5],
['0.5-1.5i', 0.5, -1.5],
['1-1.5i', 1, -1.5],
['1.5-1.5i', 1.5, -1.5],
['2-1.5i', 2, -1.5],
['2.5-1.5i', 2.5, -1.5],
['3-1.5i', 3, -1.5],
['3.5-1.5i', 3.5, -1.5],
['-2.5-1.5i', -2.5, -1.5],
['-1.5-1.5i', -1.5, -1.5],
['-0.5-1.5i', -0.5, -1.5],
['-1.5i', 0, -1.5],
['0.5-1.5i', 0.5, -1.5],
['1-1.5i', 1, -1.5],
['1.5-1.5i', 1.5, -1.5],
['2-1.5i', 2, -1.5],
['2.5-1.5i', 2.5, -1.5],
['3-1.5i', 3, -1.5],
['3.5-1.5i', 3.5, -1.5],
['-2.5-0.5i', -2.5, -0.5],
['-1.5-0.5i', -1.5, -0.5],
['-0.5-0.5i', -0.5, -0.5],
['-0.5i', 0, -0.5],
['0.5-0.5i', 0.5, -0.5],
['1-0.5i', 1, -0.5],
['1.5-0.5i', 1.5, -0.5],
['2-0.5i', 2, -0.5],
['2.5-0.5i', 2.5, -0.5],
['3-0.5i', 3, -0.5],
['3.5-0.5i', 3.5, -0.5],
['-2.5', -2.5, 0],
['-1.5', -1.5, 0],
['-0.5', -0.5, 0],
['0.0', 0, 0],
['0.5', 0.5, 0],
['1', 1, 0],
['1.5', 1.5, 0],
['2', 2, 0],
['2.5', 2.5, 0],
['3', 3, 0],
['3.5', 3.5, 0],
['-2.5+0.5i', -2.5, 0.5],
['-1.5+0.5i', -1.5, 0.5],
['-0.5+0.5i', -0.5, 0.5],
['0.5i', 0, 0.5],
['0.5+0.5i', 0.5, 0.5],
['1+0.5i', 1, 0.5],
['1.5+0.5i', 1.5, 0.5],
['2+0.5i', 2, 0.5],
['2.5+0.5i', 2.5, 0.5],
['3+0.5i', 3, 0.5],
['3.5+0.5i', 3.5, 0.5],
['-2.5+i', -2.5, 1],
['-2.5+i', -2.5, 1],
['-1.5+i', -1.5, 1],
['-1.5+i', -1.5, 1],
['-0.5+i', -0.5, 1],
['i', 0, 1],
['0.5+i', 0.5, 1],
['1+i', 1, 1],
['1.5+i', 1.5, 1],
['2+i', 2, 1],
['2.5+i', 2.5, 1],
['3+i', 3, 1],
['3.5+i', 3.5, 1],
['-2.5+1.5i', -2.5, 1.5],
['-2.5+1.5i', -2.5, 1.5],
['-1.5+1.5i', -1.5, 1.5],
['-1.5+1.5i', -1.5, 1.5],
['-0.5+1.5i', -0.5, 1.5],
['1.5i', 0, 1.5],
['0.5+1.5i', 0.5, 1.5],
['1+1.5i', 1, 1.5],
['1.5+1.5i', 1.5, 1.5],
['2+1.5i', 2, 1.5],
['2.5+1.5i', 2.5, 1.5],
['3+1.5i', 3, 1.5],
['3.5+1.5i', 3.5, 1.5],
['-2.5+2i', -2.5, 2],
['-2.5+2i', -2.5, 2],
['-1.5+2i', -1.5, 2],
['-1.5+2i', -1.5, 2],
['-0.5+2i', -0.5, 2],
['2i', 0, 2],
['0.5+2i', 0.5, 2],
['1+2i', 1, 2],
['1.5+2i', 1.5, 2],
['2+2i', 2, 2],
['2.5+2i', 2.5, 2],
['3+2i', 3, 2],
['3.5+2i', 3.5, 2],
['-2.5+2.5i', -2.5, 2.5],
['-2.5+2.5i', -2.5, 2.5],
['-1.5+2.5i', -1.5, 2.5],
['-1.5+2.5i', -1.5, 2.5],
['-0.5+2.5i', -0.5, 2.5],
['2.5i', 0, 2.5],
['0.5+2.5i', 0.5, 2.5],
['1+2.5i', 1, 2.5],
['1.5+2.5i', 1.5, 2.5],
['2+2.5i', 2, 2.5],
['2.5+2.5i', 2.5, 2.5],
['3+2.5i', 3, 2.5],
['3.5+2.5i', 3.5, 2.5],
['-2.5+3i', -2.5, 3],
['-2.5+3i', -2.5, 3],
['-1.5+3i', -1.5, 3],
['-1.5+3i', -1.5, 3],
['-0.5+3i', -0.5, 3],
['3i', 0, 3],
['0.5+3i', 0.5, 3],
['1+3i', 1, 3],
['1.5+3i', 1.5, 3],
['2+3i', 2, 3],
['2.5+3i', 2.5, 3],
['3+3i', 3, 3],
['3.5+3i', 3.5, 3],
['-2.5+3.5i', -2.5, 3.5],
['-2.5+3.5i', -2.5, 3.5],
['-1.5+3.5i', -1.5, 3.5],
['-1.5+3.5i', -1.5, 3.5],
['-0.5+3.5i', -0.5, 3.5],
['3.5i', 0, 3.5],
['0.5+3.5i', 0.5, 3.5],
['1+3.5i', 1, 3.5],
['1.5+3.5i', 1.5, 3.5],
['2+3.5i', 2, 3.5],
['2.5+3.5i', 2.5, 3.5],
['3+3.5i', 3, 3.5],
['3.5+3.5i', 3.5, 3.5],
['-2.5-2.5i', -2.5, -2.5, 'i'],
['-2.5-2.5i', -2.5, -2.5, 'i'],
['-1.5-2.5i', -1.5, -2.5, 'i'],
['-1.5-2.5i', -1.5, -2.5, 'i'],
['-0.5-2.5i', -0.5, -2.5, 'i'],
['-2.5i', 0, -2.5, 'i'],
['0.5-2.5i', 0.5, -2.5, 'i'],
['1-2.5i', 1, -2.5, 'i'],
['1.5-2.5i', 1.5, -2.5, 'i'],
['2-2.5i', 2, -2.5, 'i'],
['2.5-2.5i', 2.5, -2.5, 'i'],
['3-2.5i', 3, -2.5, 'i'],
['3.5-2.5i', 3.5, -2.5, 'i'],
['-2.5-2.5i', -2.5, -2.5, 'i'],
['-1.5-2.5i', -1.5, -2.5, 'i'],
['-0.5-2.5i', -0.5, -2.5, 'i'],
['-2.5i', 0, -2.5, 'i'],
['1-2.5i', 1, -2.5, 'i'],
['1.5-2.5i', 1.5, -2.5, 'i'],
['2-2.5i', 2, -2.5, 'i'],
['3-2.5i', 3, -2.5, 'i'],
['3.5-2.5i', 3.5, -2.5, 'i'],
['-2.5-1.5i', -2.5, -1.5, 'i'],
['-1.5-1.5i', -1.5, -1.5, 'i'],
['-0.5-1.5i', -0.5, -1.5, 'i'],
['-1.5i', 0, -1.5, 'i'],
['0.5-1.5i', 0.5, -1.5, 'i'],
['1-1.5i', 1, -1.5, 'i'],
['1.5-1.5i', 1.5, -1.5, 'i'],
['2-1.5i', 2, -1.5, 'i'],
['2.5-1.5i', 2.5, -1.5, 'i'],
['3-1.5i', 3, -1.5, 'i'],
['3.5-1.5i', 3.5, -1.5, 'i'],
['-2.5-1.5i', -2.5, -1.5, 'i'],
['-1.5-1.5i', -1.5, -1.5, 'i'],
['-0.5-1.5i', -0.5, -1.5, 'i'],
['-1.5i', 0, -1.5, 'i'],
['0.5-1.5i', 0.5, -1.5, 'i'],
['1-1.5i', 1, -1.5, 'i'],
['1.5-1.5i', 1.5, -1.5, 'i'],
['2-1.5i', 2, -1.5, 'i'],
['2.5-1.5i', 2.5, -1.5, 'i'],
['3-1.5i', 3, -1.5, 'i'],
['3.5-1.5i', 3.5, -1.5, 'i'],
['-2.5-0.5i', -2.5, -0.5, 'i'],
['-1.5-0.5i', -1.5, -0.5, 'i'],
['-0.5-0.5i', -0.5, -0.5, 'i'],
['-0.5i', 0, -0.5, 'i'],
['0.5-0.5i', 0.5, -0.5, 'i'],
['1-0.5i', 1, -0.5, 'i'],
['1.5-0.5i', 1.5, -0.5, 'i'],
['2-0.5i', 2, -0.5, 'i'],
['2.5-0.5i', 2.5, -0.5, 'i'],
['3-0.5i', 3, -0.5, 'i'],
['3.5-0.5i', 3.5, -0.5, 'i'],
['-2.5', -2.5, 0, 'i'],
['-2.5', -2.5, 0, 'i'],
['-1.5', -1.5, 0, 'i'],
['-1.5', -1.5, 0, 'i'],
['-0.5', -0.5, 0, 'i'],
['0.0', 0, 0, 'i'],
['0.5', 0.5, 0, 'i'],
['1', 1, 0, 'i'],
['1.5', 1.5, 0, 'i'],
['2', 2, 0, 'i'],
['2.5', 2.5, 0, 'i'],
['3', 3, 0, 'i'],
['3.5', 3.5, 0, 'i'],
['-2.5+0.5i', -2.5, 0.5, 'i'],
['-2.5+0.5i', -2.5, 0.5, 'i'],
['-1.5+0.5i', -1.5, 0.5, 'i'],
['-1.5+0.5i', -1.5, 0.5, 'i'],
['-0.5+0.5i', -0.5, 0.5, 'i'],
['0.5i', 0, 0.5, 'i'],
['0.5+0.5i', 0.5, 0.5, 'i'],
['1+0.5i', 1, 0.5, 'i'],
['1.5+0.5i', 1.5, 0.5, 'i'],
['2+0.5i', 2, 0.5, 'i'],
['2.5+0.5i', 2.5, 0.5, 'i'],
['3+0.5i', 3, 0.5, 'i'],
['3.5+0.5i', 3.5, 0.5, 'i'],
['-2.5+i', -2.5, 1, 'i'],
['-2.5+i', -2.5, 1, 'i'],
['-1.5+i', -1.5, 1, 'i'],
['-1.5+i', -1.5, 1, 'i'],
['-0.5+i', -0.5, 1, 'i'],
['i', 0, 1, 'i'],
['0.5+i', 0.5, 1, 'i'],
['1+i', 1, 1, 'i'],
['1.5+i', 1.5, 1, 'i'],
['2+i', 2, 1, 'i'],
['2.5+i', 2.5, 1, 'i'],
['3+i', 3, 1, 'i'],
['3.5+i', 3.5, 1, 'i'],
['-2.5+1.5i', -2.5, 1.5, 'i'],
['-2.5+1.5i', -2.5, 1.5, 'i'],
['-1.5+1.5i', -1.5, 1.5, 'i'],
['-1.5+1.5i', -1.5, 1.5, 'i'],
['-0.5+1.5i', -0.5, 1.5, 'i'],
['1.5i', 0, 1.5, 'i'],
['0.5+1.5i', 0.5, 1.5, 'i'],
['1+1.5i', 1, 1.5, 'i'],
['1.5+1.5i', 1.5, 1.5, 'i'],
['2+1.5i', 2, 1.5, 'i'],
['2.5+1.5i', 2.5, 1.5, 'i'],
['3+1.5i', 3, 1.5, 'i'],
['3.5+1.5i', 3.5, 1.5, 'i'],
['-2.5+2i', -2.5, 2, 'i'],
['-2.5+2i', -2.5, 2, 'i'],
['-1.5+2i', -1.5, 2, 'i'],
['-1.5+2i', -1.5, 2, 'i'],
['-0.5+2i', -0.5, 2, 'i'],
['2i', 0, 2, 'i'],
['0.5+2i', 0.5, 2, 'i'],
['1+2i', 1, 2, 'i'],
['1.5+2i', 1.5, 2, 'i'],
['2+2i', 2, 2, 'i'],
['2.5+2i', 2.5, 2, 'i'],
['3+2i', 3, 2, 'i'],
['3.5+2i', 3.5, 2, 'i'],
['-2.5+2.5i', -2.5, 2.5, 'i'],
['-2.5+2.5i', -2.5, 2.5, 'i'],
['-1.5+2.5i', -1.5, 2.5, 'i'],
['-1.5+2.5i', -1.5, 2.5, 'i'],
['-0.5+2.5i', -0.5, 2.5, 'i'],
['2.5i', 0, 2.5, 'i'],
['0.5+2.5i', 0.5, 2.5, 'i'],
['1+2.5i', 1, 2.5, 'i'],
['1.5+2.5i', 1.5, 2.5, 'i'],
['2+2.5i', 2, 2.5, 'i'],
['2.5+2.5i', 2.5, 2.5, 'i'],
['3+2.5i', 3, 2.5, 'i'],
['3.5+2.5i', 3.5, 2.5, 'i'],
['-2.5+3i', -2.5, 3, 'i'],
['-2.5+3i', -2.5, 3, 'i'],
['-1.5+3i', -1.5, 3, 'i'],
['-1.5+3i', -1.5, 3, 'i'],
['-0.5+3i', -0.5, 3, 'i'],
['3i', 0, 3, 'i'],
['0.5+3i', 0.5, 3, 'i'],
['1+3i', 1, 3, 'i'],
['1.5+3i', 1.5, 3, 'i'],
['2+3i', 2, 3, 'i'],
['2.5+3i', 2.5, 3, 'i'],
['3+3i', 3, 3, 'i'],
['3.5+3i', 3.5, 3, 'i'],
['-2.5+3.5i', -2.5, 3.5, 'i'],
['-2.5+3.5i', -2.5, 3.5, 'i'],
['-1.5+3.5i', -1.5, 3.5, 'i'],
['-1.5+3.5i', -1.5, 3.5, 'i'],
['-0.5+3.5i', -0.5, 3.5, 'i'],
['3.5i', 0, 3.5, 'i'],
['0.5+3.5i', 0.5, 3.5, 'i'],
['1+3.5i', 1, 3.5, 'i'],
['1.5+3.5i', 1.5, 3.5, 'i'],
['2+3.5i', 2, 3.5, 'i'],
['2.5+3.5i', 2.5, 3.5, 'i'],
['3+3.5i', 3, 3.5, 'i'],
['3.5+3.5i', 3.5, 3.5, 'i'],
['-2.5-2.5j', -2.5, -2.5, 'j'],
['-2.5-2.5j', -2.5, -2.5, 'j'],
['-1.5-2.5j', -1.5, -2.5, 'j'],
['-1.5-2.5j', -1.5, -2.5, 'j'],
['-0.5-2.5j', -0.5, -2.5, 'j'],
['-2.5j', 0, -2.5, 'j'],
['0.5-2.5j', 0.5, -2.5, 'j'],
['1-2.5j', 1, -2.5, 'j'],
['1.5-2.5j', 1.5, -2.5, 'j'],
['2-2.5j', 2, -2.5, 'j'],
['2.5-2.5j', 2.5, -2.5, 'j'],
['3-2.5j', 3, -2.5, 'j'],
['3.5-2.5j', 3.5, -2.5, 'j'],
['-2.5-2.5j', -2.5, -2.5, 'j'],
['-2.5-2.5j', -2.5, -2.5, 'j'],
['-1.5-2.5j', -1.5, -2.5, 'j'],
['-1.5-2.5j', -1.5, -2.5, 'j'],
['-0.5-2.5j', -0.5, -2.5, 'j'],
['-2.5j', 0, -2.5, 'j'],
['0.5-2.5j', 0.5, -2.5, 'j'],
['1-2.5j', 1, -2.5, 'j'],
['1.5-2.5j', 1.5, -2.5, 'j'],
['2-2.5j', 2, -2.5, 'j'],
['2.5-2.5j', 2.5, -2.5, 'j'],
['3-2.5j', 3, -2.5, 'j'],
['3.5-2.5j', 3.5, -2.5, 'j'],
['-2.5-1.5j', -2.5, -1.5, 'j'],
['-2.5-1.5j', -2.5, -1.5, 'j'],
['-1.5-1.5j', -1.5, -1.5, 'j'],
['-1.5-1.5j', -1.5, -1.5, 'j'],
['-0.5-1.5j', -0.5, -1.5, 'j'],
['-1.5j', 0, -1.5, 'j'],
['0.5-1.5j', 0.5, -1.5, 'j'],
['1-1.5j', 1, -1.5, 'j'],
['1.5-1.5j', 1.5, -1.5, 'j'],
['2-1.5j', 2, -1.5, 'j'],
['2.5-1.5j', 2.5, -1.5, 'j'],
['3-1.5j', 3, -1.5, 'j'],
['3.5-1.5j', 3.5, -1.5, 'j'],
['-2.5-1.5j', -2.5, -1.5, 'j'],
['-2.5-1.5j', -2.5, -1.5, 'j'],
['-1.5-1.5j', -1.5, -1.5, 'j'],
['-1.5-1.5j', -1.5, -1.5, 'j'],
['-0.5-1.5j', -0.5, -1.5, 'j'],
['-1.5j', 0, -1.5, 'j'],
['0.5-1.5j', 0.5, -1.5, 'j'],
['1-1.5j', 1, -1.5, 'j'],
['1.5-1.5j', 1.5, -1.5, 'j'],
['2-1.5j', 2, -1.5, 'j'],
['2.5-1.5j', 2.5, -1.5, 'j'],
['3-1.5j', 3, -1.5, 'j'],
['3.5-1.5j', 3.5, -1.5, 'j'],
['-2.5-0.5j', -2.5, -0.5, 'j'],
['-2.5-0.5j', -2.5, -0.5, 'j'],
['-1.5-0.5j', -1.5, -0.5, 'j'],
['-1.5-0.5j', -1.5, -0.5, 'j'],
['-0.5-0.5j', -0.5, -0.5, 'j'],
['-0.5j', 0, -0.5, 'j'],
['0.5-0.5j', 0.5, -0.5, 'j'],
['1-0.5j', 1, -0.5, 'j'],
['1.5-0.5j', 1.5, -0.5, 'j'],
['2-0.5j', 2, -0.5, 'j'],
['2.5-0.5j', 2.5, -0.5, 'j'],
['3-0.5j', 3, -0.5, 'j'],
['3.5-0.5j', 3.5, -0.5, 'j'],
['-2.5', -2.5, 0, 'j'],
['-2.5', -2.5, 0, 'j'],
['-1.5', -1.5, 0, 'j'],
['-1.5', -1.5, 0, 'j'],
['-0.5', -0.5, 0, 'j'],
['0.0', 0, 0, 'j'],
['0.5', 0.5, 0, 'j'],
['1', 1, 0, 'j'],
['1.5', 1.5, 0, 'j'],
['2', 2, 0, 'j'],
['2.5', 2.5, 0, 'j'],
['3', 3, 0, 'j'],
['3.5', 3.5, 0, 'j'],
['-2.5+0.5j', -2.5, 0.5, 'j'],
['-2.5+0.5j', -2.5, 0.5, 'j'],
['-1.5+0.5j', -1.5, 0.5, 'j'],
['-1.5+0.5j', -1.5, 0.5, 'j'],
['-0.5+0.5j', -0.5, 0.5, 'j'],
['0.5j', 0, 0.5, 'j'],
['0.5+0.5j', 0.5, 0.5, 'j'],
['1+0.5j', 1, 0.5, 'j'],
['1.5+0.5j', 1.5, 0.5, 'j'],
['2+0.5j', 2, 0.5, 'j'],
['2.5+0.5j', 2.5, 0.5, 'j'],
['3+0.5j', 3, 0.5, 'j'],
['3.5+0.5j', 3.5, 0.5, 'j'],
['-2.5+j', -2.5, 1, 'j'],
['-2.5+j', -2.5, 1, 'j'],
['-1.5+j', -1.5, 1, 'j'],
['-1.5+j', -1.5, 1, 'j'],
['-0.5+j', -0.5, 1, 'j'],
['j', 0, 1, 'j'],
['0.5+j', 0.5, 1, 'j'],
['1+j', 1, 1, 'j'],
['1.5+j', 1.5, 1, 'j'],
['2+j', 2, 1, 'j'],
['2.5+j', 2.5, 1, 'j'],
['3+j', 3, 1, 'j'],
['3.5+j', 3.5, 1, 'j'],
['-2.5+1.5j', -2.5, 1.5, 'j'],
['-2.5+1.5j', -2.5, 1.5, 'j'],
['-1.5+1.5j', -1.5, 1.5, 'j'],
['-1.5+1.5j', -1.5, 1.5, 'j'],
['-0.5+1.5j', -0.5, 1.5, 'j'],
['1.5j', 0, 1.5, 'j'],
['0.5+1.5j', 0.5, 1.5, 'j'],
['1+1.5j', 1, 1.5, 'j'],
['1.5+1.5j', 1.5, 1.5, 'j'],
['2+1.5j', 2, 1.5, 'j'],
['2.5+1.5j', 2.5, 1.5, 'j'],
['3+1.5j', 3, 1.5, 'j'],
['3.5+1.5j', 3.5, 1.5, 'j'],
['-2.5+2j', -2.5, 2, 'j'],
['-2.5+2j', -2.5, 2, 'j'],
['-1.5+2j', -1.5, 2, 'j'],
['-1.5+2j', -1.5, 2, 'j'],
['-0.5+2j', -0.5, 2, 'j'],
['2j', 0, 2, 'j'],
['0.5+2j', 0.5, 2, 'j'],
['1+2j', 1, 2, 'j'],
['1.5+2j', 1.5, 2, 'j'],
['2+2j', 2, 2, 'j'],
['2.5+2j', 2.5, 2, 'j'],
['3+2j', 3, 2, 'j'],
['3.5+2j', 3.5, 2, 'j'],
['-2.5+2.5j', -2.5, 2.5, 'j'],
['-2.5+2.5j', -2.5, 2.5, 'j'],
['-1.5+2.5j', -1.5, 2.5, 'j'],
['-1.5+2.5j', -1.5, 2.5, 'j'],
['-0.5+2.5j', -0.5, 2.5, 'j'],
['2.5j', 0, 2.5, 'j'],
['0.5+2.5j', 0.5, 2.5, 'j'],
['1+2.5j', 1, 2.5, 'j'],
['1.5+2.5j', 1.5, 2.5, 'j'],
['2+2.5j', 2, 2.5, 'j'],
['2.5+2.5j', 2.5, 2.5, 'j'],
['3+2.5j', 3, 2.5, 'j'],
['3.5+2.5j', 3.5, 2.5, 'j'],
['-2.5+3j', -2.5, 3, 'j'],
['-2.5+3j', -2.5, 3, 'j'],
['-1.5+3j', -1.5, 3, 'j'],
['-1.5+3j', -1.5, 3, 'j'],
['-0.5+3j', -0.5, 3, 'j'],
['3j', 0, 3, 'j'],
['0.5+3j', 0.5, 3, 'j'],
['1+3j', 1, 3, 'j'],
['1.5+3j', 1.5, 3, 'j'],
['2+3j', 2, 3, 'j'],
['2.5+3j', 2.5, 3, 'j'],
['3+3j', 3, 3, 'j'],
['3.5+3j', 3.5, 3, 'j'],
['-2.5+3.5j', -2.5, 3.5, 'j'],
['-2.5+3.5j', -2.5, 3.5, 'j'],
['-1.5+3.5j', -1.5, 3.5, 'j'],
['-1.5+3.5j', -1.5, 3.5, 'j'],
['-0.5+3.5j', -0.5, 3.5, 'j'],
['3.5j', 0, 3.5, 'j'],
['0.5+3.5j', 0.5, 3.5, 'j'],
['1+3.5j', 1, 3.5, 'j'],
['1.5+3.5j', 1.5, 3.5, 'j'],
['2+3.5j', 2, 3.5, 'j'],
['2.5+3.5j', 2.5, 3.5, 'j'],
['3+3.5j', 3, 3.5, 'j'],
['3.5+3.5j', 3.5, 3.5, 'j'],
['-1.23-4.56i', -1.23, -4.56],
['-3.21i', 0, -3.21, 'i'],
['1.23-2.34j', 1.23, -2.34, 'j'],
['-1.23', -1.23, 0],
['0.0', 0, 0, 'i'],
['1.23', 1.23, 0, 'j'],
['-1.23+4.56i', -1.23, 4.56],
['3.21i', 0, 3.21, 'i'],
['1.23+2.34j', 1.23, 2.34, 'j'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2BIN.php | tests/data/Calculation/Engineering/OCT2BIN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[ExcelError::NAN(), '1357'],
['10100110', '246'],
['011', 3, 3],
[ExcelError::NAN(), '12345'],
[ExcelError::NAN(), '123.45'],
['0', '0'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[ExcelError::NAN(), '3579'],
['1000000000', '7777777000'], // 2's Complement
['1111111111', '7777777777'], // 2's Complement
[ExcelError::NAN(), '17777777777'], // Too small
[ExcelError::NAN(), '1777'], // Too large
['111111111', '777'], // highest positive
[ExcelError::NAN(), '1000'],
['1000000000', '7777777000'], // lowest negative
[ExcelError::NAN(), '7777776777'],
['01010', 12, 5],
[ExcelError::NAN(), 12, 0],
[ExcelError::NAN(), 12, -1],
[ExcelError::NAN(), 12, 14],
[ExcelError::NAN(), 12, 3],
['1010', 12, 4],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMLOG10.php | tests/data/Calculation/Engineering/IMLOG10.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'1.13290930735019+0.187055234944717j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'9.83122969386706+0.682188176920927i',
'-12.34E-5+6.78E9i',
],
[
'0.633585864201507+0.269370929165668i',
'3.5+2.5i',
],
[
'0.561107939136413+0.120864006221476i',
'3.5+i',
],
[
'0.544068044350276',
'3.5',
],
[
'0.561107939136413-0.120864006221476i',
'3.5-i',
],
[
'0.633585864201507-0.269370929165668i',
'3.5-2.5i',
],
[
'0.430169003285497+0.516936357012023i',
'1+2.5i',
],
[
'0.150514997831991+0.34109408846046i',
'1+i',
],
[
'0',
'1',
],
[
'0.150514997831991-0.34109408846046i',
'1-i',
],
[
'0.430169003285497-0.516936357012023i',
'1-2.5i',
],
[
'0.397940008672038+0.68218817692092i',
'2.5i',
],
[
'0.68218817692092i',
'i',
],
[
ExcelError::NAN(),
'0',
],
[
'-0.68218817692092i',
'-i',
],
[
'0.397940008672038-0.68218817692092i',
'-2.5i',
],
[
'0.430169003285497+0.847439996829817i',
'-1+2.5i',
],
[
'0.150514997831991+1.02328226538138i',
'-1+i',
],
[
'1.36437635384184i',
'-1',
],
[
'0.150514997831991-1.02328226538138i',
'-1-i',
],
[
'0.430169003285497-0.847439996829817i',
'-1-2.5i',
],
[
'0.633585864201507+1.09500542467617i',
'-3.5+2.5i',
],
[
'0.561107939136413+1.24351234762036i',
'-3.5+i',
],
[
'0.544068044350276+1.36437635384184i',
'-3.5',
],
[
'0.561107939136413-1.24351234762036i',
'-3.5-i',
],
[
'0.633585864201507-1.09500542467617i',
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2DEC.php | tests/data/Calculation/Engineering/BIN2DEC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[178, 10110010],
[178, '10110010'],
[100, '1100100'],
[ExcelError::NAN(), '111001010101'], // Too large
[5, '101'],
[2, '10'],
[0, '0'],
[5, '101'],
[100, '1100100'],
[ExcelError::NAN(), '21'], // Invalid binary number
[ExcelError::VALUE(), true], // Boolean okay for ODS, not for Excel/Gnumeric
[ExcelError::VALUE(), false], // Boolean okay for ODS, not for Excel/Gnumeric
[-107, '1110010101'], // 2's Complement
[-1, '1111111111'], // 2's Complement
[-512, '1000000000'], // lowest negative
[511, '111111111'], // highest positive
[0, '0000000000'],
[1, '000000001'],
[256, '0100000000'],
[256, '100000000'],
[-256, '1100000000'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BESSELK.php | tests/data/Calculation/Engineering/BESSELK.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[ExcelError::NAN(), 1.5, -1],
[ExcelError::VALUE(), 'NaN', 1],
[ExcelError::VALUE(), 1.5, 'NaN'],
[ExcelError::NAN(), -1.5, 1],
[ExcelError::NAN(), 0.0, 1],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1.5, true],
[ExcelError::VALUE(), null, 1],
[ExcelError::VALUE(), 1.5, null],
[2.20786908479938, 0.125, 0],
[0.421024421083418, 1, 0],
[0.062347554191019, 2.5, 0],
[0.019598896971074, 3.5, 0],
[0.000146470701181, 8, 0],
[0.000001308403709, 12.5, 0],
[0.000000000074124, 22, 0],
[0.000000000000003, 32, 0],
[7.83111830250218, 0.125, 1],
[0.601907231666906, 1, 1],
[0.073890815650267, 2.5, 1],
[0.022239393224641, 3.5, 1],
[0.000155369216605, 8, 1],
[0.000001359767834, 12.5, 1],
[0.00000000007579, 22, 1],
[0.000000000000003, 32, 1],
[127.505761924834, 0.125, 2],
[1.62483888441723, 1, 2],
[0.121460206711233, 2.5, 2],
[0.032307121670869, 3.5, 2],
[0.000185313005332, 8, 2],
[0.000001525966562, 12.5, 2],
[0.000000000081014, 22, 2],
[0.000000000000003, 32, 2],
[12570631.999947274, 0.125, 5],
[360.960586772793, 1, 5],
[2.71688429212586, 2.5, 5],
[0.364824403327597, 3.5, 5],
[0.000619358014056, 8, 5],
[0.00000339242503, 12.5, 5],
[0.000000000128956, 22, 5],
[0.000000000000004, 32, 5],
[0.924419035021323, 0.5, 0.5],
[1.65644112801108, 0.5, 1.5],
[62.0579095045362, 0.5, 3.5],
[0.0, 64, 8],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2HEX.php | tests/data/Calculation/Engineering/BIN2HEX.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['B2', 10110010],
['B2', '10110010'],
[ExcelError::NAN(), '111001010101'], // Too large
['00FB', '11111011', 4], // Leading places
['0FB', '11111011', 3.75], // Leading places as a float
[ExcelError::NAN(), '11111011', -1], // Leading places negative
[ExcelError::VALUE(), '11111011', 'ABC'], // Leading places non-numeric
['E', '1110'],
['5', '101'],
['2', '10'],
['0', '0'],
[ExcelError::NAN(), '21'], // Invalid binary number
[ExcelError::VALUE(), true], // ODS accepts Boolean, Excel/Gnumeric don't
[ExcelError::VALUE(), false], // ODS accepts Boolean, Excel/Gnumeric don't
['FFFFFFFF95', '1110010101'], // 2's Complement
['FFFFFFFFFF', '1111111111'], // 2's Complement
['FFFFFFFE00', '1000000000'], // lowest negative
['1FF', '111111111'], // highest positive
['0', '0000000000'],
['1', '000000001'],
['100', '0100000000'],
['100', '100000000'],
['FFFFFFFF00', '1100000000'],
['0003', '11', 4],
[ExcelError::NAN(), '11', 0],
[ExcelError::NAN(), '11', -1],
[ExcelError::NAN(), '11', 14],
[ExcelError::NAN(), '10001', 1],
['11', '10001', '2'],
['011', '10001', '3'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DELTA.php | tests/data/Calculation/Engineering/DELTA.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[1, -1.5, -1.5],
[0, -0.75, -1.5],
[0, 0, -1.5],
[0, 0.75, -1.5],
[0, 1.5, -1.5],
[0, -1.5, -0.75],
[1, -0.75, -0.75],
[0, 0, -0.75],
[0, 0.75, -0.75],
[0, 1.5, -0.75],
[0, -1.5, 0],
[0, -0.75, 0],
[1, 0, 0],
[0, 0.75, 0],
[0, 1.5, 0],
[0, -1.5, 0.75],
[0, -0.75, 0.75],
[0, 0, 0.75],
[1, 0.75, 0.75],
[0, 1.5, 0.75],
[0, -1.5, 1.5],
[0, -0.75, 1.5],
[0, 0, 1.5],
[0, 0.75, 1.5],
[1, 1.5, 1.5],
[0, -0.75],
[1, 0],
[0, 0.75],
[ExcelError::VALUE(), 1, true],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1, 'ABC'],
[ExcelError::VALUE(), 'ABC', 1],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2DEC.php | tests/data/Calculation/Engineering/HEX2DEC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[427, '01AB'],
[43981, 'ABCD'],
[246, 'F6'],
[74565, '12345'],
[4886718345, '123456789'],
[ExcelError::NAN(), '123.45'],
[0, '0'],
[0, ''],
[ExcelError::NAN(), 'G3579A'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[ExcelError::NAN(), '-107'],
[165, 'A5'],
[1034160313, '3DA408B9'],
[-165, 'FFFFFFFF5B'], // 2's Complement
[-1, 'FFFFFFFFFF'], // 2's Complement
[ExcelError::NAN(), '1FFFFFFFFFF'], // Too large
[549755813887, '7fffffffff'], // highest positive, succeeds even for 32-bit
[-549755813888, '8000000000'], // lowest negative, succeeds even for 32-bit
[-2147483648, 'ff80000000'],
[2147483648, '80000000'],
[2147483647, '7fffffff'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCSCH.php | tests/data/Calculation/Engineering/IMCSCH.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'7.15308425027293823E-6+5.03341614148979354E-6j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-0.0483657415388563464-0.0361962406084861128i',
'3.5+2.5i',
],
[
'0.0325769243120443503-0.0508281676948511387i',
'3.5+i',
],
[
'0.0604498900091561051',
'3.5',
],
[
'0.0325769243120443503+0.0508281676948511387i',
'3.5-i',
],
[
'-0.0483657415388563464+0.0361962406084861128i',
'3.5-2.5i',
],
[
'-0.541322906190002332-0.530965577621174208i',
'1+2.5i',
],
[
'0.303931001628426450-0.621518017170428421i',
'1+i',
],
[
'0.850918128239321545',
'1',
],
[
'0.303931001628426450+0.621518017170428421i',
'1-i',
],
[
'-0.541322906190002332+0.530965577621174208i',
'1-2.5i',
],
[
'-1.67092154555867993i',
'2.5i',
],
[
'-1.18839510577812122i',
'i',
],
[
INF,
'0',
],
[
'1.18839510577812122i',
'-i',
],
[
'1.67092154555868i',
'-2.5i',
],
[
'0.5413229061900022-0.5309655776211742i',
'-1+2.5i',
],
[
'-0.30393100162842645-0.62151801717042842i',
'-1+i',
],
[
'-0.850918128239321545',
'-1',
],
[
'-0.30393100162842645+0.62151801717042842i',
'-1-i',
],
[
'0.5413229061900022+0.5309655776211742i',
'-1-2.5i',
],
[
'0.04836574153885635-0.03619624060848612i',
'-3.5+2.5i',
],
[
'-0.03257692431204435-0.05082816769485113i',
'-3.5+i',
],
[
'-0.0604498900091561051',
'-3.5',
],
[
'-0.03257692431204435+0.05082816769485113i',
'-3.5-i',
],
[
'0.04836574153885635+0.03619624060848612i',
'-3.5-2.5i',
],
[
'0.0998215696688227329',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2BINOpenOffice.php | tests/data/Calculation/Engineering/OCT2BINOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts boolean, Excel/Gnumeric don't
['0', false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2DECOpenOffice.php | tests/data/Calculation/Engineering/HEX2DECOpenOffice.php | <?php
declare(strict_types=1);
return [
[1, true], // ODS accepts boolean, Excel/Gnumeric don't
[0, false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2OCTOpenOffice.php | tests/data/Calculation/Engineering/HEX2OCTOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts boolean, Excel/Gnumeric don't
['0', false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2OCT.php | tests/data/Calculation/Engineering/HEX2OCT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['653', '01AB'],
['125715', 'ABCD'],
['366', 'F6'],
['35516', '3B4E'],
['017', 'F', 3],
['221505', '12345'],
[ExcelError::NAN(), '123456789'],
[ExcelError::NAN(), '123.45'],
['0', '0'],
[ExcelError::NAN(), 'G3579A'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[ExcelError::NAN(), '-107'],
['7777777400', 'FFFFFFFF00'], // 2's Complement
['3777777777', '1FFFFFFF'], // highest positive
[ExcelError::NAN(), '20000000'],
['4000000000', 'FFE0000000'], // lowest negative
[ExcelError::NAN(), 'FFDFFFFFFF'],
['00012', 'A', 5],
[ExcelError::NAN(), 'A', 0],
[ExcelError::NAN(), 'A', -1],
[ExcelError::NAN(), 'A', 14],
[ExcelError::NAN(), 'A', 1],
['12', 'A', 2],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMARGUMENT.php | tests/data/Calculation/Engineering/IMARGUMENT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
0.43071059555000002,
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
0.620249485983,
'3.5+2.5i',
],
[
0.27829965900499998,
'3.5+i',
],
[
0,
'3.5',
],
[
-0.27829965900499998,
'3.5-i',
],
[
-0.620249485983,
'3.5-2.5i',
],
[
1.1902899496829999,
'1+2.5i',
],
[
0.78539816339699997,
'1+i',
],
[
0,
'1',
],
[
-0.78539816339699997,
'1-i',
],
[
-1.1902899496829999,
'1-2.5i',
],
[
1.570796326795,
'2.5i',
],
[
1.570796326795,
'i',
],
[
'#DIV/0!',
'0',
],
[
-1.570796326795,
'-i',
],
[
-1.570796326795,
'-2.5i',
],
[
1.9513027039069999,
'-1+2.5i',
],
[
2.3561944901919998,
'-1+i',
],
[
3.1415926535900001,
'-1',
],
[
-2.3561944901919998,
'-1-i',
],
[
-1.9513027039069999,
'-1-2.5i',
],
[
2.5213431676070002,
'-3.5+2.5i',
],
[
2.8632929945850001,
'-3.5+i',
],
[
3.1415926535900001,
'-3.5',
],
[
-2.8632929945850001,
'-3.5-i',
],
[
-2.5213431676070002,
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMREAL.php | tests/data/Calculation/Engineering/IMREAL.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
12.34,
'12.34+5.67j',
],
[
-1.234E-5,
'-1.234E-5+6.78E9i',
],
[
3.5,
'3.5+2.5i',
],
[
3.5,
'3.5+i',
],
[
3.5,
'3.5',
],
[
3.5,
3.5,
],
[
3.5,
'3.5-i',
],
[
3.5,
'3.5-2.5i',
],
[
1,
'1+2.5i',
],
[
1,
'1+i',
],
[
1,
'1',
],
[
1,
1,
],
[
1,
'1-i',
],
[
1,
'1-2.5i',
],
[
0,
'2.5i',
],
[
0,
'i',
],
[
0,
'0',
],
[
0,
0,
],
[
0,
'-i',
],
[
0,
'-2.5i',
],
[
-1,
'-1+2.5i',
],
[
-1,
'-1+i',
],
[
-1,
'-1',
],
[
-1,
'-1-i',
],
[
-1,
'-1-2.5i',
],
[
-3.5,
'-3.5+2.5i',
],
[
-3.5,
'-3.5+i',
],
[
-3.5,
'-3.5',
],
[
-3.5,
'-3.5-i',
],
[
-3.5,
'-3.5-2.5i',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMTAN.php | tests/data/Calculation/Engineering/IMTAN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'-0.0000103999694261435177+0.999978619978377253j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'0.00876404549513463160+0.989853240015864536i',
'3.5+2.5i',
],
[
'0.145476605392064825+0.803096047002175475i',
'3.5+i',
],
[
'0.374585640158594666',
'3.5',
],
[
'0.145476605392064825-0.803096047002175475i',
'3.5-i',
],
[
'0.00876404549513463160-0.989853240015864536i',
'3.5-2.5i',
],
[
'0.0123221382558283535+1.00554801189505998i',
'1+2.5i',
],
[
'0.271752585319511717+1.08392332733869454i',
'1+i',
],
[
'1.55740772465490223',
'1',
],
[
'0.271752585319511717-1.08392332733869454i',
'1-i',
],
[
'0.0123221382558283535-1.00554801189505998i',
'1-2.5i',
],
[
'0.986614298151430289i',
'2.5i',
],
[
'0.761594155955764888i',
'i',
],
[
'0.0',
'0',
],
[
'-0.761594155955764888i',
'-i',
],
[
'-0.98661429815143i',
'-2.5i',
],
[
'-0.01232213825582835+1.00554801189506i',
'-1+2.5i',
],
[
'-0.27175258531951172+1.0839233273386945i',
'-1+i',
],
[
'-1.55740772465490223',
'-1',
],
[
'-0.27175258531951172-1.08392332733869454i',
'-1-i',
],
[
'-0.01232213825582835-1.00554801189506i',
'-1-2.5i',
],
[
'-0.00876404549513463+0.989853240015864i',
'-3.5+2.5i',
],
[
'-0.1454766053920648+0.803096047002176i',
'-3.5+i',
],
[
'-0.374585640158594666',
'-3.5',
],
[
'-0.1454766053920648-0.803096047002176i',
'-3.5-i',
],
[
'-0.00876404549513463-0.989853240015864i',
'-3.5-2.5i',
],
[
'-0.142546543074277805',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2BIN.php | tests/data/Calculation/Engineering/DEC2BIN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['101100101', '357'],
['1001', 9, 4],
['00001001', 9, 8],
['001001', 9, 6.75], // Leading places as a float
[ExcelError::NAN(), 9, -1], // Leading places negative
[ExcelError::VALUE(), 9, 'ABC'], // Leading places non-numeric
['11110110', '246'],
[ExcelError::NAN(), '12345'],
[ExcelError::NAN(), '123456789'],
['1111011', '123.45'],
['0', '0'],
[ExcelError::VALUE(), '3579A'], // Invalid decimal
[ExcelError::VALUE(), true], // ODS accepts boolean, Excel/Gnumeric don't
[ExcelError::VALUE(), false], // ODS accepts boolean, Excel/Gnumeric don't
['1110011100', '-100'], // 2's Complement
['1110010101', '-107'], // 2's Complement
['1000000000', '-512'], // lowest negative
['111111111', '511'], // highest positive
[ExcelError::NAN(), '512'], // Too large
[ExcelError::NAN(), '-513'], // Too small
['0011', 3, 4],
[ExcelError::NAN(), 3, 0],
[ExcelError::NAN(), 3, -1],
[ExcelError::NAN(), 3, 14],
[ExcelError::NAN(), 3, 1],
['11', 3, 2],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSIN.php | tests/data/Calculation/Engineering/IMSIN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'-32.5483841590412+141.315819535092j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-2.15110429680353-5.66575444574645i',
'3.5+2.5i',
],
[
'-0.541286805665839-1.10052501669986i',
'3.5+i',
],
[
'-0.35078322768962',
'3.5',
],
[
'-0.541286805665839+1.10052501669986i',
'3.5-i',
],
[
'-2.15110429680353+5.66575444574645i',
'3.5-2.5i',
],
[
'5.16014366757971+3.26893943207955i',
'1+2.5i',
],
[
'1.29845758141598+0.634963914784736i',
'1+i',
],
[
'0.841470984807897',
'1',
],
[
'1.29845758141598-0.634963914784736i',
'1-i',
],
[
'5.16014366757971-3.26893943207955i',
'1-2.5i',
],
[
'6.05020448103979i',
'2.5i',
],
[
'1.1752011936438i',
'i',
],
[
'0',
'0',
],
[
'-1.1752011936438i',
'-i',
],
[
'-6.05020448103979i',
'-2.5i',
],
[
'-5.16014366757971+3.26893943207955i',
'-1+2.5i',
],
[
'-1.29845758141598+0.634963914784736i',
'-1+i',
],
[
'-0.841470984807897',
'-1',
],
[
'-1.29845758141598-0.634963914784736i',
'-1-i',
],
[
'-5.16014366757971-3.26893943207955i',
'-1-2.5i',
],
[
'2.15110429680353-5.66575444574645i',
'-3.5+2.5i',
],
[
'0.541286805665839-1.10052501669986i',
'-3.5+i',
],
[
'0.35078322768962',
'-3.5',
],
[
'0.541286805665839+1.10052501669986i',
'-3.5-i',
],
[
'2.15110429680353+5.66575444574645i',
'-3.5-2.5i',
],
[
'0.141120008059867',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2DEC.php | tests/data/Calculation/Engineering/OCT2DEC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[751, '1357'],
[166, '246'],
[5349, '12345'],
[ExcelError::NAN(), '123.45'],
[0, '0'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[ExcelError::NAN(), '3579'],
[44, '54'],
[-165, '7777777533'], // 2's Complement
[0, ''],
[ExcelError::NAN(), '37777777770'], // too many digits
[536870911, '3777777777'], // highest positive
[-536870912, '4000000000'], // lowest negative
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMAGINARY.php | tests/data/Calculation/Engineering/IMAGINARY.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
5.6699999999999999,
'12.34+5.67j',
],
[
6780000000.0,
'1.234E-5+6.78E9i',
],
[
2.5,
'3.5+2.5i',
],
[
1,
'3.5+i',
],
[
0,
'3.5',
],
[
-1,
'3.5-i',
],
[
-2.5,
'3.5-2.5i',
],
[
2.5,
'1+2.5i',
],
[
1,
'1+i',
],
[
0,
'1',
],
[
0,
1,
],
[
-1,
'1-i',
],
[
-2.5,
'1-2.5i',
],
[
2.5,
'2.5i',
],
[
1,
'i',
],
[
0,
'0',
],
[
0,
0,
],
[
0,
0.0,
],
[
-1,
'-i',
],
[
-2.5,
'-2.5i',
],
[
2.5,
'-1+2.5i',
],
[
1,
'-1+i',
],
[
0,
'-1',
],
[
-1,
'-1-i',
],
[
-2.5,
'-1-2.5i',
],
[
2.5,
'-3.5+2.5i',
],
[
1,
'-3.5+i',
],
[
0,
'-3.5',
],
[
-1,
'-3.5-i',
],
[
-2.5,
'-3.5-2.5i',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMLN.php | tests/data/Calculation/Engineering/IMLN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'2.60862008281875+0.430710595550204j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'22.6372429388987+1.5707963267949i',
'-1.234E-5+6.78E9i',
],
[
'1.45888536604214+0.620249485982821i',
'3.5+2.5i',
],
[
'1.29199877621612+0.278299659005111i',
'3.5+i',
],
[
'1.25276296849537',
'3.5',
],
[
'1.29199877621612-0.278299659005111i',
'3.5-i',
],
[
'1.45888536604214-0.620249485982821i',
'3.5-2.5i',
],
[
'0.990500734433292+1.19028994968253i',
'1+2.5i',
],
[
'0.346573590279973+0.785398163397448i',
'1+i',
],
[
'0',
'1',
],
[
'0.346573590279973-0.785398163397448i',
'1-i',
],
[
'0.990500734433292-1.19028994968253i',
'1-2.5i',
],
[
'0.916290731874155+1.5707963267949i',
'2.5i',
],
[
'1.5707963267949i',
'i',
],
[
ExcelError::NAN(),
'0',
],
[
'-1.5707963267949i',
'-i',
],
[
'0.916290731874155-1.5707963267949i',
'-2.5i',
],
[
'0.990500734433292+1.95130270390726i',
'-1+2.5i',
],
[
'0.346573590279973+2.35619449019234i',
'-1+i',
],
[
'3.14159265358979i',
'-1',
],
[
'0.346573590279973-2.35619449019234i',
'-1-i',
],
[
'0.990500734433292-1.95130270390726i',
'-1-2.5i',
],
[
'1.45888536604214+2.52134316760697i',
'-3.5+2.5i',
],
[
'1.29199877621612+2.86329299458468i',
'-3.5+i',
],
[
'1.25276296849537+3.14159265358979i',
'-3.5',
],
[
'1.29199877621612-2.86329299458468i',
'-3.5-i',
],
[
'1.45888536604214-2.52134316760697i',
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BITOR.php | tests/data/Calculation/Engineering/BITOR.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[55, 21, 39],
[248, 200, '184'],
[248, 72, 184],
[ExcelError::NAN(), 12.34, 56.78], // non-integer argument
[60, 12.00, 56.00],
[ExcelError::VALUE(), 'ABC', 'DEF'],
[ExcelError::VALUE(), 'ABC', 1],
[ExcelError::VALUE(), 1, 'DEF'],
[ExcelError::NAN(), 12.00, 2.82E14],
[5123456789, 5123456788, 1],
[7415004949, 5123456789, 7123456789],
[ExcelError::NAN(), -5123456788, 1],
[ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48
[ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48
[ExcelError::NAN(), -2, 1], // negative argument
[ExcelError::NAN(), 2, -1], // negative argument
[ExcelError::NAN(), -2, -1], // negative argument
[ExcelError::NAN(), 3.1, 1], // non-integer argument
[ExcelError::NAN(), 3, 1.1], // non-integer argument
[4, 4, null],
[4, 4, false],
[5, 4, true],
[4, null, 4],
[4, false, 4],
[5, true, 4],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2OCTOpenOffice.php | tests/data/Calculation/Engineering/DEC2OCTOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts bool, Excel/Gnumeric do not
['0', false],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2HEX.php | tests/data/Calculation/Engineering/OCT2HEX.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['2EF', '1357'],
['A6', '246'],
['14E5', '12345'],
['0040', 100, 4],
[ExcelError::NAN(), '123.45'],
['0', '0'],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[ExcelError::NAN(), '3579'],
['FFFFFFFF5B', '7777777533'], // 2's Complement
['00108', 410, 5],
[ExcelError::NAN(), 410, 0],
[ExcelError::NAN(), 410, -1],
[ExcelError::NAN(), 410, 14],
[ExcelError::NAN(), 410, 2],
['108', 410, 3],
[ExcelError::NAN(), '37777777770'], // too many digits
['1FFFFFFF', '3777777777'], // highest positive
['FFE0000000', '4000000000'], // lowest negative
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSINH.php | tests/data/Calculation/Engineering/IMSINH.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'93502.0563677416700-65794.6618992949199j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-13.2530202358612674+9.91837391474661948i',
'3.5+2.5i',
],
[
'8.93801966862639899+13.9455510970032033i',
'3.5+i',
],
[
'16.5426272876349976',
'3.5',
],
[
'8.93801966862639899-13.9455510970032033i',
'3.5-i',
],
[
'-13.2530202358612674-9.91837391474661948i',
'3.5-2.5i',
],
[
'-0.941504933270867276+0.923490776043173241i',
'1+2.5i',
],
[
'0.634963914784736108+1.29845758141597729i',
'1+i',
],
[
'1.17520119364380146',
'1',
],
[
'0.634963914784736108-1.29845758141597729i',
'1-i',
],
[
'-0.941504933270867276-0.923490776043173241i',
'1-2.5i',
],
[
'0.598472144103956494i',
'2.5i',
],
[
'0.841470984807896507i',
'i',
],
[
'0.0',
'0',
],
[
'-0.841470984807896507i',
'-i',
],
[
'-0.5984721441039565i',
'-2.5i',
],
[
'0.941504933270867+0.923490776043173i',
'-1+2.5i',
],
[
'-0.63496391478473611+1.29845758141597729i',
'-1+i',
],
[
'-1.17520119364380146',
'-1',
],
[
'-0.63496391478473611-1.29845758141597729i',
'-1-i',
],
[
'0.941504933270867-0.923490776043173i',
'-1-2.5i',
],
[
'13.25302023586127+9.91837391474662i',
'-3.5+2.5i',
],
[
'-8.9380196686264+13.9455510970032i',
'-3.5+i',
],
[
'-16.5426272876349976',
'-3.5',
],
[
'-8.9380196686264-13.9455510970032i',
'-3.5-i',
],
[
'13.25302023586127-9.91837391474662i',
'-3.5-2.5i',
],
[
'10.0178749274099019',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2OCT.php | tests/data/Calculation/Engineering/DEC2OCT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['545', '357'],
['2515', '1357'],
['366', '246'],
['30071', '12345'],
['726746425', '123456789'],
['173', '123.45'],
['072', 58, 3],
['0', '0'],
[ExcelError::VALUE(), '3579A'], // Invalid decimal
[ExcelError::VALUE(), true], // ODS accepts bool, Excel/Gnumeric do not
[ExcelError::VALUE(), false],
['7777777634', '-100'], // 2's Complement
['7777777625', '-107'], // 2's Complement
['3777777777', 536870911], // highest positive
[ExcelError::NAN(), 536870912],
['4000000000', -536870912], // lowest negative
[ExcelError::NAN(), -536870913],
['0403', 259, 4],
[ExcelError::NAN(), 259, 0],
[ExcelError::NAN(), 259, -1],
[ExcelError::NAN(), 259, 14],
[ExcelError::NAN(), 259, 1],
['403', 259, 3],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2HEXOpenOffice.php | tests/data/Calculation/Engineering/DEC2HEXOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts bool, Excel/Gnumeric do not
['0', false],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2OCTOpenOffice.php | tests/data/Calculation/Engineering/BIN2OCTOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // Boolean okay for ODS, not for Excel/Gnumeric
['0', false], // Boolean okay for ODS, not for Excel/Gnumeric
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/ERF.php | tests/data/Calculation/Engineering/ERF.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
// Result, lower bound, upper bound,
return [
[0.0, 0],
[0.0112834155558496, 0.01],
[0.056371977797016602, 0.05],
[0.11246291601828499, 0.1],
[0.140316204801334, 0.125],
[0.167995971427363, 0.15],
[0.222702589210478, 0.2],
[0.27632639016823701, 0.25],
[0.328626759459127, 0.3],
[0.37938205356230997, 0.35],
[0.42839235504666801, 0.4],
[0.475481719786924, 0.45],
[0.52049987781304696, 0.5],
[0.60385609084792602, 0.6],
[0.67780119383741799, 0.7],
[0.74210096470766096, 0.8],
[0.79690821242283205, 0.9],
[0.84270079294971501, 1],
[0.88020506957408196, 1.1],
[0.910313978229635, 1.2],
[0.93400794494065198, 1.3],
[0.95228511976264896, 1.4],
[0.96610514647531098, 1.5],
[0.98667167121918198, 1.75],
[0.99532226501895305, 2],
[0.99959304798255499, 2.5],
[0.99997790950300103, 3],
[0.99999925690162805, 3.5],
[0.99999998458274197, 4],
[0.99999999980338405, 4.5],
[0.99999999999846301, 5],
[0.99999999999999301, 5.5],
[1.0, 6],
[1.0, 32],
[-0.11246291601828499, -0.1],
[-0.84270079294971501, -1],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[0.99532226501895305, '2'],
[ExcelError::VALUE(), 'TWO'],
[0.0, -1.5, -1.5],
[-0.25494951282179601, -0.75, -1.5],
[-0.96610514647531098, 0, -1.5],
[-1.67726078012883, 0.75, -1.5],
[-1.93221029295062, 1.5, -1.5],
[-1.96464242988863, 2.25, -1.5],
[-1.96608305597831, 3, -1.5],
[-1.96610503274805, 3.75, -1.5],
[-1.96610514627869, 4.5, -1.5],
[0.25494951282179601, -1.5, -0.75],
[0.0, -0.75, -0.75],
[-0.71115563365351497, 0, -0.75],
[-1.4223112673070299, 0.75, -0.75],
[-1.67726078012883, 1.5, -0.75],
[-1.70969291706683, 2.25, -0.75],
[-1.71113354315652, 3, -0.75],
[-1.71115551992626, 3.75, -0.75],
[-1.7111556334569, 4.5, -0.75],
[0.96610514647531098, -1.5, 0],
[0.71115563365351497, -0.75, 0],
[0.0, 0, 0],
[-0.71115563365351497, 0.75, 0],
[-0.96610514647531098, 1.5, 0],
[-0.99853728341331904, 2.25, 0],
[-0.99997790950300103, 3, 0],
[-0.99999988627274305, 3.75, 0],
[-0.99999999980338405, 4.5, 0],
[1.67726078012883, -1.5, 0.75],
[1.4223112673070299, -0.75, 0.75],
[0.71115563365351497, 0, 0.75],
[0.0, 0.75, 0.75],
[-0.25494951282179601, 1.5, 0.75],
[-0.28738164975980401, 2.25, 0.75],
[-0.288822275849486, 3, 0.75],
[-0.28884425261922803, 3.75, 0.75],
[-0.28884436614986903, 4.5, 0.75],
[1.93221029295062, -1.5, 1.5],
[1.67726078012883, -0.75, 1.5],
[0.96610514647531098, 0, 1.5],
[0.25494951282179601, 0.75, 1.5],
[0.0, 1.5, 1.5],
[-0.032432136938008102, 2.25, 1.5],
[-0.0338727630276906, 3, 1.5],
[-0.033894739797432599, 3.75, 1.5],
[-0.033894853328073203, 4.5, 1.5],
[1.96464242988863, -1.5, 2.25],
[1.70969291706683, -0.75, 2.25],
[0.99853728341331904, 0, 2.25],
[0.28738164975980401, 0.75, 2.25],
[0.032432136938008102, 1.5, 2.25],
[0.0, 2.25, 2.25],
[-0.0014406260896824999, 3, 2.25],
[-0.0014626028594246, 3.75, 2.25],
[-0.0014627163900651, 4.5, 2.25],
[1.96608305597831, -1.5, 3],
[1.71113354315652, -0.75, 3],
[0.99997790950300103, 0, 3],
[0.288822275849486, 0.75, 3],
[0.0338727630276906, 1.5, 3],
[0.0014406260896824999, 2.25, 3],
[0.0, 3, 3],
[-2.1976769741999999E-5, 3.75, 3],
[-2.2090300382599999E-5, 4.5, 3],
[1.96610503274805, -1.5, 3.75],
[1.71115551992626, -0.75, 3.75],
[0.99999988627274305, 0, 3.75],
[0.28884425261922803, 0.75, 3.75],
[0.033894739797432599, 1.5, 3.75],
[0.0014626028594246, 2.25, 3.75],
[2.1976769741999999E-5, 3, 3.75],
[0.0, 3.75, 3.75],
[-1.135306406E-7, 4.5, 3.75],
[1.96610514627869, -1.5, 4.5],
[1.7111556334569, -0.75, 4.5],
[0.99999999980338405, 0, 4.5],
[0.28884436614986903, 0.75, 4.5],
[0.033894853328073203, 1.5, 4.5],
[0.0014627163900651, 2.25, 4.5],
[2.2090300382599999E-5, 3, 4.5],
[1.135306406E-7, 3.75, 4.5],
[0.0, 4.5, 4.5],
[-1.84270079294818, 5, -1],
[1.84270079294818, -5, 1],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2OCT.php | tests/data/Calculation/Engineering/BIN2OCT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['144', 1100100],
['262', '10110010'],
[ExcelError::NAN(), '111001010101'], // Too large
['011', '1001', 3], // Leading places
['0011', '1001', 4.75], // Leading places as a float
[ExcelError::NAN(), '1001', -1], // Leading places negative
[ExcelError::VALUE(), '1001', 'ABC'], // Leading places non-numeric
['2', '00000010'],
['5', '00000101'],
['15', '00001101'],
['0', '0'],
[ExcelError::NAN(), '21'], // Invalid binary number
[ExcelError::VALUE(), true], // Boolean okay for ODS, not for others
[ExcelError::VALUE(), false], // Boolean okay for ODS, not for others
['7777777625', '1110010101'], // 2's Complement
['7777777777', '1111111111'], // 2's Complement
['7777777000', '1000000000'], // lowest negative
['777', '111111111'], // highest positive
['0', '0000000000'],
['1', '000000001'],
['400', '0100000000'],
['400', '100000000'],
['7777777400', '1100000000'],
['0003', '11', 4],
[ExcelError::NAN(), '11', 0],
[ExcelError::NAN(), '11', -1],
[ExcelError::NAN(), '11', 14],
[ExcelError::NAN(), '10001', 1],
['21', '10001', 2],
['021', '10001', 3],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/CONVERTUOM.php | tests/data/Calculation/Engineering/CONVERTUOM.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
'Imperial from and to (mass)' => [1.942559385723E-03, 1.0, 'ozm', 'sg'],
'Same prefixed metric UoM' => [5.0, 5.0, 'kg', 'kg'],
'Imperial to prefixed metric' => [4.5359237E-01, 1.0, 'lbm', 'kg'],
'Prefixed metric to prefixed metric, same unit' => [0.2, 2.0, 'hg', 'kg'],
'Unprefixed metric to prefixed metric, same unit' => [12.345, 12345, 'm', 'km'],
'Prefixed metric to unprefixed metric, same unit' => [12345.0, 12.345, 'km', 'm'],
'Prefixed metric to imperial' => [0.62137119223732995, 1, 'km', 'mi'],
'Prefixed metric to alternative metric' => [1.23450e5, 12.345, 'um', 'ang'],
'Prefixed metric to alternative prefixed metric' => [1.2345E+02, 12.345, 'um', 'kang'],
'Prefixed metric to 2-character prefixed metric, same unit' => [1000.0, 100.0, 'hl', 'dal'],
'Imperial to Imperial (distance)' => [1.0, 3.0, 'ft', 'yd'],
[20.0, 68, 'F', 'C'],
[68.0, 20, 'C', 'F'],
[293.145, 67.991, 'F', 'K'],
[67.991, 293.145, 'K', 'F'],
[-273.15, 0, 'K', 'C'],
[-459.67, 0, 'K', 'F'],
[295.15, 22, 'C', 'K'],
[22.5, 295.65, 'K', 'C'],
'Melting Point of Titanium (K to C)' => [1667.85, 1941, 'K', 'C'],
'Melting Point of Titanium (K to F)' => [3034.13, 1941, 'K', 'F'],
'Melting Point of Titanium (K to Rankine)' => [3493.8, 1941, 'K', 'Rank'],
'Melting Point of Titanium (K to Réaumur)' => [1334.28, 1941, 'K', 'Reau'],
'Melting Point of Titanium (Rankine to K)' => [1941.0, 3493.8, 'Rank', 'K'],
'Melting Point of Titanium (Réaumur to K)' => [1941.0, 1334.28, 'Reau', 'K'],
'Temperature synonyms (K)' => [123.45, 123.45, 'K', 'kel'],
'Temperature synonyms (C)' => [123.45, 123.45, 'C', 'cel'],
'Temperature synonyms (F)' => [123.45, 123.45, 'F', 'fah'],
'Invalid value to convert' => [ExcelError::VALUE(), 'three', 'ft', 'yds'],
'Imperial to 2-character prefixed imperial, same unit' => [ExcelError::NA(), 100.0, 'pt', 'dapt'],
'Prefixed metric to binary prefixed metric' => [ExcelError::NA(), 12.345, 'um', 'kiang'],
'Mismatched categories' => [ExcelError::NA(), 1, 'ft', 'day'],
'From prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kpt', 'lt'],
'To prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'lt', 'kpt'],
'From binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kiqt', 'pt'],
'To binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'pt', 'kiqt'],
'From prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'baton', 'cwt'],
'To prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'cwt', 'baton'],
'Invalid from unit' => [ExcelError::NA(), 234.56, 'xxxx', 'm'],
'Invalid to unit' => [ExcelError::NA(), 234.56, 'm', 'xxxx'],
'Basic Information conversion' => [2, 16, 'bit', 'byte'],
'Information with standard metric prefix' => [1000, 1, 'kbyte', 'byte'],
'Information with binary prefix' => [1024, 1, 'kibyte', 'byte'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/OCT2DECOpenOffice.php | tests/data/Calculation/Engineering/OCT2DECOpenOffice.php | <?php
declare(strict_types=1);
return [
[1, true], // ODS accepts boolean, Excel/Gnumeric don't
[0, false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/GESTEP.php | tests/data/Calculation/Engineering/GESTEP.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[1, -1.5, -1.5],
[1, -0.75, -1.5],
[1, 0, -1.5],
[1, 0.75, -1.5],
[1, 1.5, -1.5],
[1, 2.25, -1.5],
[1, 3, -1.5],
[1, 3.75, -1.5],
[1, 4.5, -1.5],
[0, -1.5, -0.75],
[1, -0.75, -0.75],
[1, 0, -0.75],
[1, 0.75, -0.75],
[1, 1.5, -0.75],
[1, 2.25, -0.75],
[1, 3, -0.75],
[1, 3.75, -0.75],
[1, 4.5, -0.75],
[0, -1.5, 0],
[0, -0.75, 0],
[1, 0, 0],
[1, 0.75, 0],
[1, 1.5, 0],
[1, 2.25, 0],
[1, 3, 0],
[1, 3.75, 0],
[1, 4.5, 0],
[0, -1.5, 0.75],
[0, -0.75, 0.75],
[0, 0, 0.75],
[1, 0.75, 0.75],
[1, 1.5, 0.75],
[1, 2.25, 0.75],
[1, 3, 0.75],
[1, 3.75, 0.75],
[1, 4.5, 0.75],
[0, -1.5, 1.5],
[0, -0.75, 1.5],
[0, 0, 1.5],
[0, 0.75, 1.5],
[1, 1.5, 1.5],
[1, 2.25, 1.5],
[1, 3, 1.5],
[1, 3.75, 1.5],
[1, 4.5, 1.5],
[0, -1.5, 2.25],
[0, -0.75, 2.25],
[0, 0, 2.25],
[0, 0.75, 2.25],
[0, 1.5, 2.25],
[1, 2.25, 2.25],
[1, 3, 2.25],
[1, 3.75, 2.25],
[1, 4.5, 2.25],
[0, -1.5, 3],
[0, -0.75, 3],
[0, 0, 3],
[0, 0.75, 3],
[0, 1.5, 3],
[0, 2.25, 3],
[1, 3, 3],
[1, 3.75, 3],
[1, 4.5, 3],
[0, -1.5, 3.75],
[0, -0.75, 3.75],
[0, 0, 3.75],
[0, 0.75, 3.75],
[0, 1.5, 3.75],
[0, 2.25, 3.75],
[0, 3, 3.75],
[1, 3.75, 3.75],
[1, 4.5, 3.75],
[0, -1.5, 4.5],
[0, -0.75, 4.5],
[0, 0, 4.5],
[0, 0.75, 4.5],
[0, 1.5, 4.5],
[0, 2.25, 4.5],
[0, 3, 4.5],
[0, 3.75, 4.5],
[1, 4.5, 4.5],
[0, -1.5],
[ExcelError::VALUE(), 1, true],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1, 'ABC'],
[ExcelError::VALUE(), 'ABC', 1],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMDIV.php | tests/data/Calculation/Engineering/IMDIV.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
ExcelError::NAN(),
'12.34+5.67j',
'123.45+67.89i',
],
[
ExcelError::NAN(),
'12.34+5.67j',
'Invalid Complex Number',
],
[
'0.0961415519586104-0.00694248653276682j',
'12.34+5.67j',
'123.45+67.89j',
],
[
'0.0961415519586104+0.00694248653276682i',
'-12.34+5.67i',
'-123.45+67.89i',
],
[
'0.0573549954111941+0.0774712890924744i',
'-12.34-5.67i',
'-123.45+67.89i',
],
[
'0.0573549954111941-0.0774712890924744i',
'-12.34+5.67i',
'-123.45-67.89i',
],
[
'0.0961415519586104-0.00694248653276682i',
'-12.34-5.67i',
'-123.45-67.89i',
],
[
'-0.0573549954111941-0.0774712890924744i',
'12.34+5.67i',
'-123.45+67.89i',
],
[
'-0.0961415519586104-0.00694248653276682i',
'12.34-5.67i',
'-123.45+67.89i',
],
[
'-0.0961415519586104+0.00694248653276682i',
'12.34+5.67i',
'-123.45-67.89i',
],
[
'-0.0573549954111941+0.0774712890924744i',
'12.34-5.67i',
'-123.45-67.89i',
],
[
'-0.0573549954111941+0.0774712890924744i',
'-12.34+5.67i',
'123.45+67.89i',
],
[
'-0.0961415519586104+0.00694248653276682i',
'-12.34-5.67i',
'123.45+67.89i',
],
[
'-0.0961415519586104-0.00694248653276682i',
'-12.34+5.67i',
'123.45-67.89i',
],
[
'-0.0573549954111941-0.0774712890924744i',
'-12.34-5.67i',
'123.45-67.89i',
],
[
'1',
'-12.34-5.67i',
'-12.34-5.67i',
],
[
'-0.0767482736849023-0.0422068878126206i',
'-12.34',
'123.45-67.89i',
],
[
'1+0.459481361426256i',
'-12.34-5.67i',
'-12.34',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/ERFC.php | tests/data/Calculation/Engineering/ERFC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
// Result, x value
return [
[1.0, 0],
[0.98871658444415, 0.01],
[0.94362802220298303, 0.05],
[0.88753708398171505, 0.1],
[0.859683795198666, 0.125],
[0.832004028572636, 0.15],
[0.77729741078952197, 0.2],
[0.72367360983176299, 0.25],
[0.671373240540873, 0.3],
[0.62061794643768997, 0.35],
[0.57160764495333205, 0.4],
[0.524518280213076, 0.45],
[0.47950012218695298, 0.5],
[0.39614390915207398, 0.6],
[0.32219880616258201, 0.7],
[0.25789903529233899, 0.8],
[0.203091787577168, 0.9],
[0.15729920705028499, 1],
[0.119794930425918, 1.1],
[0.089686021770364596, 1.2],
[0.065992055059347507, 1.3],
[0.047714880237351202, 1.4],
[0.033894853524689302, 1.5],
[0.0133283287808176, 1.75],
[0.0046777349810473001, 2],
[0.00040695201744500001, 2.5],
[2.20904969986E-5, 3],
[7.4309837229999996E-7, 3.5],
[1.54172579E-8, 4],
[1.9661600000000001E-10, 4.5],
[1.5375000000000001E-12, 5],
[7.4000000000000003E-15, 5.5],
[0.0, 6],
[0.0, 32],
[1.1124629160182899, -0.1],
[1.8427007929497099, -1],
[ExcelError::VALUE(), true],
[ExcelError::VALUE(), false],
[0.0046777349810473001, '2'],
[ExcelError::VALUE(), 'TWO'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCONJUGATE.php | tests/data/Calculation/Engineering/IMCONJUGATE.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'12.34-5.67j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'3.5-2.5i',
'3.5+2.5i',
],
[
'3.5-i',
'3.5+i',
],
[
'3.5',
'3.5',
],
[
'3.5+i',
'3.5-i',
],
[
'3.5+2.5i',
'3.5-2.5i',
],
[
'1-2.5i',
'1+2.5i',
],
[
'1-i',
'1+i',
],
[
'1',
'1',
],
[
'1+i',
'1-i',
],
[
'1+2.5i',
'1-2.5i',
],
[
'-2.5i',
'2.5i',
],
[
'-i',
'i',
],
[
'0.0',
'0',
],
[
'i',
'-i',
],
[
'2.5i',
'-2.5i',
],
[
'-1-2.5i',
'-1+2.5i',
],
[
'-1-i',
'-1+i',
],
[
'-1',
'-1',
],
[
'-1+i',
'-1-i',
],
[
'-1+2.5i',
'-1-2.5i',
],
[
'-3.5-2.5i',
'-3.5+2.5i',
],
[
'-3.5-i',
'-3.5+i',
],
[
'-3.5',
'-3.5',
],
[
'-3.5+i',
'-3.5-i',
],
[
'-3.5+2.5i',
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMCOS.php | tests/data/Calculation/Engineering/IMCOS.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'141.319179436356+32.547610312508j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-5.74262349163406+2.12231025604134i',
'3.5+2.5i',
],
[
'-1.44502817950166+0.412240867891067i',
'3.5+i',
],
[
'-0.936456687290796',
'3.5',
],
[
'-1.44502817950166-0.412240867891067i',
'3.5-i',
],
[
'-5.74262349163406-2.12231025604134i',
'3.5-2.5i',
],
[
'3.31329014611322-5.0910715229497i',
'1+2.5i',
],
[
'0.833730025131149-0.988897705762865i',
'1+i',
],
[
'0.54030230586814',
'1',
],
[
'0.833730025131149+0.988897705762865i',
'1-i',
],
[
'3.31329014611322+5.0910715229497i',
'1-2.5i',
],
[
'6.13228947966369',
'2.5i',
],
[
'1.54308063481524',
'i',
],
[
'1',
'0',
],
[
'1.54308063481524',
'-i',
],
[
'6.13228947966369',
'-2.5i',
],
[
'3.31329014611322+5.0910715229497i',
'-1+2.5i',
],
[
'0.833730025131149+0.988897705762865i',
'-1+i',
],
[
'0.54030230586814',
'-1',
],
[
'0.833730025131149-0.988897705762865i',
'-1-i',
],
[
'3.31329014611322-5.0910715229497i',
'-1-2.5i',
],
[
'-5.74262349163406-2.12231025604134i',
'-3.5+2.5i',
],
[
'-1.44502817950166-0.412240867891067i',
'-3.5+i',
],
[
'-0.936456687290796',
'-3.5',
],
[
'-1.44502817950166+0.412240867891067i',
'-3.5-i',
],
[
'-5.74262349163406+2.12231025604134i',
'-3.5-2.5i',
],
[
'-0.989992496600445',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2HEX.php | tests/data/Calculation/Engineering/DEC2HEX.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['165', '357'],
['54D', '1357'],
['F6', '246'],
['3039', '12345'],
['75BCD15', '123456789'],
['0064', 100, 4],
['00064', 100, 5.75], // Leading places as a float
[ExcelError::NAN(), 100, -1], // Leading places negative
[ExcelError::VALUE(), 100, 'ABC'], // Leading places non-numeric
['7B', '123.45'],
['0', '0'],
[ExcelError::VALUE(), '3579A'], // Invalid decimal
[ExcelError::VALUE(), true], // ODS accepts boolean, Excel/Gnumeric don't
[ExcelError::VALUE(), false],
['FFFFFFFFCA', '-54'], // 2's Complement
['FFFFFFFF95', '-107'], // 2's Complement
['FF80000001', '-2147483647'], // 2's Complement
['FF80000000', '-2147483648'], // 2's Complement
['7FFFFFFFFF', 549755813887], // highest positive, succeeds even for 32-bit
[ExcelError::NAN(), 549755813888],
['8000000000', -549755813888], // lowest negative, succeeds even for 32-bit
['A2DE246000', -400000000000],
['5D21DBA000', 400000000000],
[ExcelError::NAN(), -549755813889],
['0103', 259, 4],
[ExcelError::NAN(), 259, 0],
[ExcelError::NAN(), 259, -1],
[ExcelError::NAN(), 259, 14],
[ExcelError::NAN(), 259, 1],
['103', 259, 3],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMPOWER.php | tests/data/Calculation/Engineering/IMPOWER.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'120.1267+139.9356j',
'12.34+5.67j',
2,
],
[
ExcelError::NAN(),
'Invalid Complex Number',
2,
],
[
'688.928626+2407.923693j',
'12.34+5.67j',
3,
],
[
'6.69108496973016E-002-3.07442883131037E-002j',
'12.34+5.67j',
-1,
],
[
'3.53185054333564E-003-4.11425290873718E-003j',
'12.34+5.67j',
-2,
],
[
'3.60002071031685+0.787495469644252j',
'12.34+5.67j',
0.5,
],
[
'0.517904976730581-5.59833234375533E-002j',
'12.34+5.67j',
-0.25,
],
[
'1',
'12.34+5.67j',
0,
],
[
'-1-1.34451369308841E-014i',
'-i',
2,
],
[
'1.22460635382238E-016-2i',
'1-i',
2,
],
[
'-6.25+8.40321058180257E-014i',
'2.5i',
2,
],
[
'-6.98771242968685-6.98771242968684i',
'2.5i',
'2.5',
],
[
ExcelError::VALUE(),
'2.5i',
'2.5i',
],
[
9.8821176880261898,
'2.5',
'2.5',
],
[
4,
'2',
'2',
],
[
'-4.69972844488573E-15+9.35464904349343E-15i',
'-12.34-5.67i',
'-12.34',
],
[
'5.93343000067521E-15-8.62503997728057E-15i',
'12.34-5.67i',
'-12.34',
],
[
'-42881944468901.9-85355046682682.3i',
'-12.34-5.67i',
'12.34',
],
[
'54138663282971.3+78697841733874.3i',
'12.34-5.67i',
'12.34',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/HEX2BINOpenOffice.php | tests/data/Calculation/Engineering/HEX2BINOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts boolean, Excel/Gnumeric don't
['0', false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSEC.php | tests/data/Calculation/Engineering/IMSEC.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'0.00671973874162309199-0.00154764157870523791j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'-0.153210472299609239-0.0566222314884645297i',
'3.5+2.5i',
],
[
'-0.639945455994778845-0.182565069612144926i',
'3.5+i',
],
[
'-1.06785504719181066',
'3.5',
],
[
'-0.639945455994778845+0.182565069612144926i',
'3.5-i',
],
[
'-0.153210472299609239+0.0566222314884645297i',
'3.5-2.5i',
],
[
'0.0897986028721219428+0.137981006709970822i',
'1+2.5i',
],
[
'0.498337030555186785+0.591083841721045048i',
'1+i',
],
[
'1.85081571768092562',
'1',
],
[
'0.498337030555186785-0.591083841721045048i',
'1-i',
],
[
'0.0897986028721219428-0.137981006709970822i',
'1-2.5i',
],
[
'0.163071231929977826',
'2.5i',
],
[
'0.648054273663885400',
'i',
],
[
'1.0',
'0',
],
[
'0.648054273663885400',
'-i',
],
[
'0.163071231929977826',
'-2.5i',
],
[
'0.0897986028721219428-0.137981006709970822i',
'-1+2.5i',
],
[
'0.498337030555186785-0.591083841721045048i',
'-1+i',
],
[
'1.85081571768092562',
'-1',
],
[
'0.498337030555186785+0.591083841721045048i',
'-1-i',
],
[
'0.0897986028721219428+0.137981006709970822i',
'-1-2.5i',
],
[
'-0.153210472299609239+0.0566222314884645297i',
'-3.5+2.5i',
],
[
'-0.639945455994778845+0.182565069612144926i',
'-3.5+i',
],
[
'-1.06785504719181066',
'-3.5',
],
[
'-0.639945455994778845-0.182565069612144926i',
'-3.5-i',
],
[
'-0.153210472299609239-0.0566222314884645297i',
'-3.5-2.5i',
],
[
'-1.01010866590799375',
'3',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BITLSHIFT.php | tests/data/Calculation/Engineering/BITLSHIFT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[96.0, 3, 5],
[36.0, 9, '2'],
[ExcelError::VALUE(), 'ABC', 5],
[ExcelError::VALUE(), 5, 'ABC'],
[ExcelError::NAN(), 1, 48], // result too large
[ExcelError::NAN(), 1.1, 2], // first arg must be integer
[4.0, 1, 2.1], // second arg will be truncated
[ExcelError::NAN(), 0, 54], // second arg too large
[0.0, 0, 5],
[ExcelError::NAN(), -16, 2], // first arg cant be negative
[1.0, 4, -2], // negative shift permitted
[1.0, 4, -2.1], // negative shift and (ignored) fraction permitted
[4.0, 4, null],
[4.0, 4, false],
[8.0, 4, true],
[0.0, null, 4],
[4.0, 4, false],
[8.0, 4, true],
[0.0, false, 4],
[16.0, true, 4],
[8000000000.0, 1000000000, 3], // result > 2**32
[16000000000.0, 8000000000, 1], // argument > 2**32
[ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48
[1.0, 2 ** 47, -47],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSUM.php | tests/data/Calculation/Engineering/IMSUM.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
ExcelError::NAN(),
'12.34+5.67j',
'123.45+67.89i',
],
[
ExcelError::NAN(),
'12.34+5.67j',
'Invalid Complex Number',
],
[
'135.79+73.56j',
'12.34+5.67j',
'123.45+67.89j',
],
[
'135.79+62.22i',
'12.34-5.67i',
'123.45+67.89i',
],
[
'135.79-62.22i',
'12.34+5.67i',
'123.45-67.89i',
],
[
'135.79-73.56i',
'12.34-5.67i',
'123.45-67.89i',
],
[
'259.24+141.45i',
'12.34+5.67i',
'123.45+67.89i',
'123.45+67.89i',
],
[
ExcelError::NAN(),
'12.34+5.67i',
'123.45+67.89i',
'123.45+67.89j',
],
[
'111.11-73.56i',
'-12.34-5.67i',
'123.45-67.89i',
],
[
'-111.11-73.56i',
'12.34-5.67i',
'-123.45-67.89i',
],
[
'-135.79-73.56i',
'-12.34-5.67i',
'-123.45-67.89i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BITXOR.php | tests/data/Calculation/Engineering/BITXOR.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[50, 21, 39],
[112, 200, '184'],
[216, 114.00, 170.00],
[ExcelError::VALUE(), 'ABC', 'DEF'],
[ExcelError::VALUE(), 'ABC', 1],
[ExcelError::VALUE(), 1, 'DEF'],
[ExcelError::NAN(), 12.00, 2.82E14],
[5123456789, 5123456788, 1],
[2583096320, 5123456789, 7123456789],
[ExcelError::NAN(), -5123456788, 1],
[ExcelError::NAN(), 2 ** 50, 1], // argument >= 2**48
[ExcelError::NAN(), 1, 2 ** 50], // argument >= 2**48
[ExcelError::NAN(), -2, 1], // negative argument
[ExcelError::NAN(), 2, -1], // negative argument
[ExcelError::NAN(), -2, -1], // negative argument
[ExcelError::NAN(), 3.1, 1], // non-integer argument
[ExcelError::NAN(), 3, 1.1], // non-integer argument
[4, 4, null],
[4, 4, false],
[5, 4, true],
[4, null, 4],
[4, false, 4],
[5, true, 4],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSUB.php | tests/data/Calculation/Engineering/IMSUB.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
ExcelError::NAN(),
'12.34+5.67j',
'123.45+67.89i',
],
[
ExcelError::NAN(),
'12.34+5.67j',
'Invalid Complex Number',
],
[
'111.11+62.22j',
'123.45+67.89j',
'12.34+5.67j',
],
[
'-111.11-62.22j',
'12.34+5.67j',
'123.45+67.89j',
],
[
'-111.11-62.22i',
'12.34+5.67i',
'123.45+67.89i',
],
[
'-135.79+62.22i',
'-12.34-5.67i',
'123.45-67.89i',
],
[
'135.79+62.22i',
'12.34-5.67i',
'-123.45-67.89i',
],
[
'111.11+62.22i',
'-12.34-5.67i',
'-123.45-67.89i',
],
[
'111.11+67.89i',
'-12.34',
'-123.45-67.89i',
],
[
'111.11-67.89i',
'-12.34',
'-123.45+67.89i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMSQRT.php | tests/data/Calculation/Engineering/IMSQRT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
'3.60002071031685+0.787495469644252j',
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
'58223.7065120385+58223.7065120386i',
'-1.234E-5+6.78E9i',
],
[
'1.9749889409211+0.632914936433528i',
'3.5+2.5i',
],
[
'1.88945163270197+0.264627043818521i',
'3.5+i',
],
[
'1.87082869338697',
'3.5',
],
[
'1.88945163270197-0.264627043818521i',
'3.5-i',
],
[
'1.9749889409211-0.632914936433528i',
'3.5-2.5i',
],
[
'1.35878298553655+0.919940868634298i',
'1+2.5i',
],
[
'1.09868411346781+0.455089860562227i',
'1+i',
],
[
'1',
'1',
],
[
'1.09868411346781-0.455089860562227i',
'1-i',
],
[
'1.35878298553655-0.919940868634298i',
'1-2.5i',
],
[
'1.11803398874989+1.11803398874989i',
'2.5i',
],
[
'0.707106781186548+0.707106781186547i',
'i',
],
[
'0',
'0',
],
[
'0.707106781186548-0.707106781186547i',
'-i',
],
[
'1.11803398874989-1.11803398874989i',
'-2.5i',
],
[
'0.919940868634298+1.35878298553655i',
'-1+2.5i',
],
[
'0.455089860562227+1.09868411346781i',
'-1+i',
],
[
'0.923879532511287+0.382683432365089i',
'0.707106781186548+0.707106781186547i',
],
[
'0.455089860562227-1.09868411346781i',
'-1-i',
],
[
'0.919940868634298-1.35878298553655i',
'-1-2.5i',
],
[
'0.632914936433528+1.9749889409211i',
'-3.5+2.5i',
],
[
'0.264627043818521+1.88945163270197i',
'-3.5+i',
],
[
'1.14602144155088E-16+1.87082869338697i',
'-3.5',
],
[
'0.264627043818521-1.88945163270197i',
'-3.5-i',
],
[
'0.632914936433528-1.9749889409211i',
'-3.5-2.5i',
],
[
'3',
'9',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/ERFPRECISE.php | tests/data/Calculation/Engineering/ERFPRECISE.php | <?php
declare(strict_types=1);
// Result, lower bound, upper bound
return [
[0.0, 0],
[0.0112834155558496, 0.01],
[-0.8427007929497148, -1.0],
[0.9661051464753108, 1.5],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/DEC2BINOpenOffice.php | tests/data/Calculation/Engineering/DEC2BINOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // ODS accepts boolean, Excel/Gnumeric don't
['0', false], // ODS accepts boolean, Excel/Gnumeric don't
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/IMABS.php | tests/data/Calculation/Engineering/IMABS.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[
13.58029822942,
'12.34+5.67j',
],
[
ExcelError::NAN(),
'Invalid Complex Number',
],
[
6780000000.0,
'1.234E-5+6.78E9i',
],
[
4.3011626335209998,
'3.5+2.5i',
],
[
3.6400549446400001,
'3.5+i',
],
[
3.5,
'3.5',
],
[
3.6400549446400001,
'3.5-i',
],
[
4.3011626335209998,
'3.5-2.5i',
],
[
2.6925824035670001,
'1+2.5i',
],
[
1.4142135623730001,
'1+i',
],
[
1,
'1',
],
[
1.4142135623730001,
'1-i',
],
[
2.6925824035670001,
'1-2.5i',
],
[
2.5,
'2.5i',
],
[
1,
'i',
],
[
0,
'0',
],
[
1,
'-i',
],
[
2.5,
'-2.5i',
],
[
2.6925824035670001,
'-1+2.5i',
],
[
1.4142135623730001,
'-1+i',
],
[
1,
'-1',
],
[
1.4142135623730001,
'-1-i',
],
[
2.6925824035670001,
'-1-2.5i',
],
[
4.3011626335209998,
'-3.5+2.5i',
],
[
3.6400549446400001,
'-3.5+i',
],
[
3.5,
'-3.5',
],
[
3.6400549446400001,
'-3.5-i',
],
[
4.3011626335209998,
'-3.5-2.5i',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BESSELI.php | tests/data/Calculation/Engineering/BESSELI.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
[ExcelError::NAN(), 1.5, -1],
[ExcelError::VALUE(), 'NaN', 1],
[ExcelError::VALUE(), 1.5, 'NaN'],
[ExcelError::VALUE(), true, 1],
[ExcelError::VALUE(), 1.5, true],
[ExcelError::VALUE(), null, 1],
[ExcelError::VALUE(), 1.5, null],
[30596.33413506702, -12.5, 0],
[2815.7166648041534, -10, 0],
[268.161313800963, -7.5, 0],
[7.37820347757186, -3.5, 0],
[3.28983917239129, -2.5, 0],
[1.26606584803426, -1, 0],
[1.00391006406612, -0.125, 0],
[1.0, 0, 0],
[1.00391006406612, 0.125, 0],
[1.26606584803426, 1, 0],
[3.28983917239129, 2.5, 0],
[7.37820347757186, 3.5, 0],
[427.564125313702, 8, 0],
[30596.33413506702, 12.5, 0],
[306693019.30610687, 22, 0],
[5590908218797.506, 32, 0],
[-29345.751017210714, -12.5, 1],
[-2670.988320559247, -10, 1],
[-249.584367947395, -7.5, 1],
[-6.205834932063, -3.5, 1],
[-2.51671624202536, -2.5, 1],
[-0.565159097581943, -1, 1],
[-0.062622149768879, -0.125, 1],
[0.0, 0, 1],
[0.062622149768879, 0.125, 1],
[0.565159097581943, 1, 1],
[2.51671624202536, 2.5, 1],
[6.205834932063, 3.5, 1],
[399.873134789592, 8, 1],
[29345.751017210714, 12.5, 1],
[299639573.1780888, 22, 1],
[5502845662755.76, 32, 1],
[25901.0143489759, -12.5, 2],
[2281.518997169878, -10, 2],
[201.605482454266, -7.5, 2],
[3.83201207162936, -3.5, 2],
[1.27646615881561, -2.5, 2],
[0.135747666580699, -1, 2],
[0.001955669369142, -0.125, 2],
[0.0, 0, 2],
[0.001955669369142, 0.125, 2],
[0.135747666580699, 1, 2],
[1.27646615881561, 2.5, 2],
[3.83201207162936, 3.5, 2],
[327.595838875391, 8, 2],
[25901.0143489759, 12.5, 2],
[279453053.1335468, 22, 2],
[5246981502816.42, 32, 2],
[-10949.6155627918, -12.5, 5],
[-777.188296433171, -10, 5],
[-48.2413608068669, -7.5, 5],
[-0.223984956078518, -3.5, 5],
[-0.032843475454962, -2.5, 5],
[-0.000271463149585, -1, 5],
[-0.000000007952461, -0.125, 5],
[0.0, 0, 5],
[0.000000007952461, 0.125, 5],
[0.000271463149585, 1, 5],
[0.032843475454962, 2.5, 5],
[0.223984956078518, 3.5, 5],
[85.5358071768162, 8, 5],
[10949.6155627918, 12.5, 5],
[171888048.06410483, 22, 5],
[3762429557237.2134, 32, 5],
[-0.002645111902465, -0.5, 3.5],
[-0.257894303289036, -0.5, 1.5],
[1.06348334399461, -0.5, 0.5],
[1.06348334399461, 0.5, 0.5],
[0.25789430328903, 0.5, 1.5],
[0.002645111902465, 0.5, 3.5],
[1.8834049312002036e26, 64, 8],
[1.8834049312002036e26, -64, 8],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Engineering/BIN2HEXOpenOffice.php | tests/data/Calculation/Engineering/BIN2HEXOpenOffice.php | <?php
declare(strict_types=1);
return [
['1', true], // Boolean okay for ODS, not for Excel/Gnumeric
['0', false], // Boolean okay for ODS, not for Excel/Gnumeric
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_EVEN.php | tests/data/Calculation/Information/IS_EVEN.php | <?php
declare(strict_types=1);
return [
[
'#NAME?',
null,
],
[
false,
-1,
],
[
true,
0,
],
[
false,
9,
],
[
false,
1.25,
],
[
false,
1.5,
],
[
true,
2.25,
],
[
true,
2.5,
],
[
'#VALUE!',
'',
],
[
false,
'-1',
],
[
true,
'2',
],
[
false,
'-1.5',
],
[
true,
'2.5',
],
[
'#VALUE!',
'ABC',
],
[
'#VALUE!',
'#VALUE!',
],
[
'#VALUE!',
'#N/A',
],
[
'#VALUE!',
'TRUE',
],
[
'#VALUE!',
true,
],
[
'#VALUE!',
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_NUMBER.php | tests/data/Calculation/Information/IS_NUMBER.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
true,
-1,
],
[
true,
0,
],
[
true,
9,
],
[
true,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
false,
'#VALUE!',
],
[
false,
'#N/A',
],
[
false,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/ERROR_TYPE.php | tests/data/Calculation/Information/ERROR_TYPE.php | <?php
declare(strict_types=1);
return [
[
'#N/A',
null,
],
[
'#N/A',
-1,
],
[
'#N/A',
1.25,
],
[
'#N/A',
'',
],
[
'#N/A',
'2.5',
],
[
'#N/A',
true,
],
[
1,
'#NULL!',
],
[
2,
'#DIV/0!',
],
[
3,
'#VALUE!',
],
[
4,
'#REF!',
],
[
5,
'#NAME?',
],
[
6,
'#NUM!',
],
[
7,
'#N/A',
],
[
9,
'#SPILL!',
],
[
14,
'#CALC!',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_LOGICAL.php | tests/data/Calculation/Information/IS_LOGICAL.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
false,
'#VALUE!',
],
[
false,
'#N/A',
],
[
false,
'TRUE',
],
[
true,
true,
],
[
true,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/INFO.php | tests/data/Calculation/Information/INFO.php | <?php
declare(strict_types=1);
return [
[
'/',
'directory',
],
[
1,
'numfile',
],
[
'$A:$A$1',
'origin',
],
[
'PHP ' . PHP_VERSION,
'osversion',
],
[
'Automatic',
'recalc',
],
[
'Automatic',
'RECALC',
],
[
PHP_VERSION,
'release',
],
[
'PHP',
'system',
],
[
'#N/A',
'memavail',
],
[
'#N/A',
'memused',
],
[
'#N/A',
'totmem',
],
[
'#VALUE!',
'1',
],
[
'#VALUE!',
'A',
],
[
'#VALUE!',
'#VALUE!',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_ERR.php | tests/data/Calculation/Information/IS_ERR.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
true,
'#VALUE!',
],
[
false,
'#N/A',
],
[
false,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/N.php | tests/data/Calculation/Information/N.php | <?php
declare(strict_types=1);
return [
[
0,
null,
],
[
-1,
-1,
],
[
1.25,
1.25,
],
[
0,
'',
],
[
0,
'2.5',
],
[
0,
'TRUE',
],
[
0,
'ABCDE',
],
[
1,
true,
],
[
'#DIV/0!',
'#DIV/0!',
],
[
'#NUM!',
'#NUM!',
],
[
0,
[
null,
],
],
[
123,
[
123,
],
],
[
123,
[
[
123,
456,
],
],
],
[
123,
[
[
123,
'A',
],
],
],
[
0,
[
[
'A',
123,
],
],
],
[
0,
[
[
'A',
123,
],
[
456,
789,
],
],
],
[
123,
[
[
123,
'A',
],
[
456,
789,
],
],
],
[
123,
[
[
123,
456,
],
[
'A',
789,
],
],
],
[
123,
[
[
123,
456,
],
[
789,
'A',
],
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_ODD.php | tests/data/Calculation/Information/IS_ODD.php | <?php
declare(strict_types=1);
return [
[
'#NAME?',
null,
],
[
true,
-1,
],
[
false,
0,
],
[
true,
9,
],
[
true,
1.25,
],
[
true,
1.5,
],
[
false,
2.25,
],
[
false,
2.5,
],
[
'#VALUE!',
'',
],
[
true,
'-1',
],
[
false,
'2',
],
[
true,
'-1.5',
],
[
false,
'2.5',
],
[
'#VALUE!',
'ABC',
],
[
'#VALUE!',
'#VALUE!',
],
[
'#VALUE!',
'#N/A',
],
[
'#VALUE!',
'TRUE',
],
[
'#VALUE!',
true,
],
[
'#VALUE!',
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_NA.php | tests/data/Calculation/Information/IS_NA.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
false,
'#VALUE!',
],
[
true,
'#N/A',
],
[
false,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/TYPE.php | tests/data/Calculation/Information/TYPE.php | <?php
declare(strict_types=1);
return [
[
1,
null,
],
[
1,
-1,
],
[
1,
1.25,
],
[
2,
'',
],
[
2,
'2.5',
],
[
2,
'TRUE',
],
[
2,
'ABCDE',
],
[
4,
true,
],
[
16,
'#DIV/0!',
],
[
16,
'#NUM!',
],
[
1,
[
null,
],
],
[
1,
[
1,
],
],
[
64,
[
1,
2,
3,
],
],
[
64,
[
[
1,
2,
3,
],
[
4,
5,
6,
],
[
7,
8,
9,
],
],
],
[
64,
[
[
null,
null,
],
[
null,
null,
],
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_ERROR.php | tests/data/Calculation/Information/IS_ERROR.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
true,
'#VALUE!',
],
[
true,
'#N/A',
],
[
true,
'#SPILL!',
],
[
true,
'#CALC!',
],
[
false,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_NONTEXT.php | tests/data/Calculation/Information/IS_NONTEXT.php | <?php
declare(strict_types=1);
return [
[
true,
null,
],
[
true,
-1,
],
[
true,
0,
],
[
true,
9,
],
[
true,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
true,
'#VALUE!',
],
[
true,
'#N/A',
],
[
false,
'TRUE',
],
[
true,
true,
],
[
true,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_BLANK.php | tests/data/Calculation/Information/IS_BLANK.php | <?php
declare(strict_types=1);
return [
[
true,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
false,
'',
],
[
false,
'-1',
],
[
false,
'2',
],
[
false,
'-1.5',
],
[
false,
'ABC',
],
[
false,
'#VALUE!',
],
[
false,
'#N/A',
],
[
false,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Information/IS_TEXT.php | tests/data/Calculation/Information/IS_TEXT.php | <?php
declare(strict_types=1);
return [
[
false,
null,
],
[
false,
-1,
],
[
false,
0,
],
[
false,
9,
],
[
false,
1.5,
],
[
true,
'',
],
[
true,
'-1',
],
[
true,
'2',
],
[
true,
'-1.5',
],
[
true,
'ABC',
],
[
false,
'#VALUE!',
],
[
false,
'#N/A',
],
[
true,
'TRUE',
],
[
false,
true,
],
[
false,
false,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Functions/IF_CONDITION.php | tests/data/Calculation/Functions/IF_CONDITION.php | <?php
declare(strict_types=1);
return [
[
'<"A"',
'<A',
],
[
'>"A"',
'>A',
],
[
'<="A"',
'<=A',
],
[
'>"A"',
'>A',
],
[
'>="A"',
'>=A',
],
[
'<>"A"',
'<>A',
],
[
'<"<A"',
'<<A',
],
[
'="A"',
'=A',
],
[
'="""A"""',
'="A"',
],
[
'="""A""B"""',
'="A"B"',
],
[
'<>"< PLEASE SELECT >"',
'<>< Please Select >',
],
[
'<>""',
'<>',
],
[
'=""',
'""',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/LEFT.php | tests/data/Calculation/TextData/LEFT.php | <?php
declare(strict_types=1);
return [
[
'',
null,
1,
],
[
'',
'',
1,
],
[
'',
'ABC',
0,
],
[
'#VALUE!',
'QWERTYUIOP',
-1,
],
[
'#VALUE!',
'QWERTYUIOP',
'NaN',
],
'null length defaults to 0' => [
'',
'QWERTYUIOP',
null,
],
'omitted length defaults to 1' => [
'Q',
'QWERTYUIOP',
],
[
'ABC',
'ABCDEFGHI',
3,
],
[
'Ενα',
'Ενα δύο τρία τέσσερα πέντε',
3,
],
[
'Ενα δύο',
'Ενα δύο τρία τέσσερα πέντε',
7,
],
[
'Ενα δύο τρία',
'Ενα δύο τρία τέσσερα πέντε',
12,
],
[
'TR',
true,
2,
],
[
'FA',
false,
2,
],
'string not specified' => [
'exception',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/EXACT.php | tests/data/Calculation/TextData/EXACT.php | <?php
declare(strict_types=1);
return [
[
true,
'',
'',
],
[
true,
'1000',
1000,
],
[
true,
1000,
'1000',
],
[
true,
'Abč',
'Abč',
],
[
false,
'abč',
'Abč',
],
[
false,
'10.010',
10.01,
],
[
false,
' ',
'',
],
'no arguments' => ['exception'],
'one argument1' => ['exception', 'abc'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/TEXTJOIN.php | tests/data/Calculation/TextData/TEXTJOIN.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Cell\DataType;
return [
[
'ABCDE,FGHIJ',
[',', true, 'ABCDE', 'FGHIJ'],
],
[
'ABCDEFGHIJ',
['', true, 'ABCDE', 'FGHIJ'],
],
[
'1-2-3',
['-', true, 1, 2, 3],
],
[
'A-B-C-E',
['-', true, 'A', 'B', 'C', null, 'E'],
],
[
'A-B-C--E',
['-', false, 'A', 'B', 'C', null, 'E'],
],
[
'A-B-C-',
['-', false, 'A', 'B', 'C', null],
],
[
'A-B-C--',
['-', false, 'A', 'B', 'C', null, null],
],
[
'<<::>>',
['::', true, '<<', '>>'],
],
[
'Καλό απόγευμα',
[' ', true, 'Καλό', 'απόγευμα'],
],
[
'Boolean-TRUE',
['-', true, 'Boolean', '', true],
],
[
'Boolean-TRUE',
['-', true, 'Boolean', ' ', true],
],
[
'Boolean--TRUE',
['-', false, 'Boolean', '', true],
],
[
'C:\Users\Mark\Documents\notes.doc',
['\\', true, 'C:', 'Users', 'Mark', 'Documents', 'notes.doc'],
],
'no argument' => ['exception', []],
'one argument' => ['exception', ['-']],
'two arguments' => ['exception', ['-', true]],
'three arguments' => ['a', ['-', true, 'a']],
'boolean as string' => ['TRUE-FALSE-TRUE', ['-', true, true, false, true]],
'result too long' => [
'#CALC!',
[
',',
true,
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),
'abcde',
],
],
'result just fits' => [
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5) . ',abcd',
[
',',
true,
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),
'abcd',
],
],
'propagate REF' => ['#REF!', [',', true, '1', '=sheet99!A1', '3']],
'propagate NUM' => ['#NUM!', [',', true, '1', '=SQRT(-1)', '3']],
'propagate DIV0' => ['#DIV/0!', [',', true, '1', '=12/0', '3']],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/SUBSTITUTE.php | tests/data/Calculation/TextData/SUBSTITUTE.php | <?php
declare(strict_types=1);
return [
[
'QWDFGYUIOP',
'QWERTYUIOP',
'ERT',
'DFG',
],
[
'Mxrk Bxker',
'Mark Baker',
'a',
'x',
],
[
'Mxrk Baker',
'Mark Baker',
'a',
'x',
1,
],
[
'Mark Bxker',
'Mark Baker',
'a',
'x',
2,
],
[
'Mark Bakker',
'Mark Baker',
'k',
'kk',
2,
],
[
'Mark Baker',
'Mark Baker',
'x',
'a',
1,
],
[
'Ενα δύο αρία αέσσερα πέναε',
'Ενα δύο τρία τέσσερα πέντε',
'τ',
'α',
],
[
'Ενα δύο τρία αέσσερα πέντε',
'Ενα δύο τρία τέσσερα πέντε',
'τ',
'α',
2,
],
[
'Ενα δύο τρία ατέσσερα πέντε',
'Ενα δύο τρία τέσσερα πέντε',
'τ',
'ατ',
2,
],
'Unicode equivalence is not supported' => [
"\u{0061}\u{030A}",
"\u{0061}\u{030A}",
"\u{00E5}",
'x',
],
'Multibytes are supported' => [
'x',
"\u{00E5}",
"\u{00E5}",
'x',
],
'no arguments' => ['exception'],
'one argument' => ['exception', 'a'],
'two arguments' => ['exception', 'a', 'b'],
'negative instance' => ['#VALUE!', 'abcdefg', 'def', 123, -1],
'non-numeric instance' => ['#VALUE!', 'abcdefg', 'def', 123, 'xyz'],
'null instance' => ['abc123g', 'abcdefg', 'def', 123],
'0 instance' => ['#VALUE!', 'abcdefg', 'def', 123, 0],
'1 instance' => ['abc123g', 'abcdefg', 'def', 123, 1],
'past last instance' => ['abcdefg', 'abcdefg', 'def', 123, 2],
'bool false instance' => ['#VALUE!', 'abcdefg', 'def', '123', false],
'bool true instance' => ['#VALUE!', 'abcdefg', 'def', '123', true],
'bool text' => ['FA-SE', false, 'L', '-'],
'propagate REF' => ['#REF!', '=sheet99!A1', 'A', 'x'],
'propagate DIV0' => ['#DIV/0!', 'hello', '=1/0', 1, 'x'],
'string which just sneaks in' => [
str_repeat('A', 32766) . 'C',
str_repeat('A', 32766) . 'B',
'B',
'C',
],
'string which overflows' => [
'#VALUE!',
str_repeat('A', 32766) . 'B',
'B',
'CC',
],
'okay long string instance' => [
'AAAAB' . str_repeat('A', 32762),
str_repeat('A', 32767),
'A',
'B',
5,
],
'overflow long string instance' => [
'#VALUE!',
str_repeat('A', 32767),
'A',
'BB',
5,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/VALUETOTEXT.php | tests/data/Calculation/TextData/VALUETOTEXT.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\RichText\RichText;
$richText1 = new RichText();
$richText1->createTextRun('Hello');
$richText1->createText(' World');
$richText2 = new RichText();
$richText2->createTextRun('Hello');
$richText2->createText("\nWorld");
return [
['1', 1, 0],
['1.23', 1.23, 0],
['-123.456', -123.456, 0],
['TRUE', true, 0],
['FALSE', false, 0],
['Hello World', 'Hello World', 0],
['HelloWorld', "Hello\nWorld", 0],
['"Hello World"', 'Hello World', 1],
['"HelloWorld"', "Hello\nWorld", 1],
['Hello World', $richText1, 0],
['HelloWorld', $richText2, 0],
['"Hello World"', $richText1, 1],
['"HelloWorld"', $richText2, 1],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/UPPER.php | tests/data/Calculation/TextData/UPPER.php | <?php
declare(strict_types=1);
return [
[
'ABCDEFGHI',
'AbCdEfGhI',
],
[
'MARK BAKER',
'mark baker',
],
[
'BUENOS DÍAS',
'buenos días',
],
[
'ΚΑΛΗΜΕΡΑ',
'Καλημερα',
],
[
'ДОБРОЕ УТРО',
'доброе утро',
],
[
'TRUE',
true,
],
[
'FALSE',
false,
],
'error code unchanged' => [
'#VALUE!',
'#VALUE!',
],
'no arguments' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/LOWER.php | tests/data/Calculation/TextData/LOWER.php | <?php
declare(strict_types=1);
return [
[
'abcdefghi',
'AbCdEfGhI',
],
[
'mark baker',
'MARK BAKER',
],
[
'buenos días',
'BUENOS DÍAS',
],
[
'καλημερα',
'ΚΑΛΗΜΕΡΑ',
],
[
'доброе утро',
'ДОБРОЕ УТРО',
],
[
'true',
true,
],
[
'false',
false,
],
'error code unchanged' => [
'#VALUE!',
'#VALUE!',
],
'no argument' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/T.php | tests/data/Calculation/TextData/T.php | <?php
declare(strict_types=1);
return [
[
'',
123456.789,
],
[
'123456.789',
'123456.789',
],
[
'Mark Baker',
'Mark Baker',
],
[
'',
null,
],
[
'',
true,
],
'no arguments' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/FIND.php | tests/data/Calculation/TextData/FIND.php | <?php
declare(strict_types=1);
return [
[
3,
'E',
'QWERTYUIOP',
],
[
4,
'D',
'ABCDEFGHI',
],
[
4,
'E',
true,
],
[
5,
'E',
false,
],
[
'#VALUE!',
'A',
'Mark Baker',
],
[
2,
'A',
'MARK BAKER',
],
[
1,
'Ενα',
'Ενα δύο τρία τέσσερα πέντε',
],
[
9,
'τρία',
'Ενα δύο τρία τέσσερα πέντε',
],
[
22,
'πέντε',
'Ενα δύο τρία τέσσερα πέντε',
],
[
1,
'ΕΝΑ',
'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',
],
[
9,
'ΤΡΊΑ',
'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',
],
[
22,
'ΠΈΝΤΕ',
'ΕΝΑ ΔΎΟ ΤΡΊΑ ΤΈΣΣΕΡΑ ΠΈΝΤΕ',
],
[
2,
'a',
'Mark Baker',
2,
],
[
4,
'k',
'Mark Baker',
2,
],
[
8,
'k',
'Mark Baker',
5,
],
[
7,
'a',
'Mark Baker',
3,
],
[
'#VALUE!',
'BITE',
'BIT',
],
[
1,
'',
'Mark Baker',
],
[
8,
'',
'Mark Baker',
8,
],
'Boolean Needle' => [
'#VALUE!',
true,
'Mark Baker',
],
'no arguments' => ['exception'],
'one argument' => ['exception', 'a'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/TEXTBEFORE.php | tests/data/Calculation/TextData/TEXTBEFORE.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
'END Case-sensitive Offset 1' => [
'Red riding ',
[
"Red riding hood's red hood",
'hood',
],
],
'END Case-sensitive Offset 2' => [
"Red riding hood's red ",
[
"Red riding hood's red hood",
'hood',
2,
],
],
'END Case-sensitive Offset -1' => [
"Red riding hood's red ",
[
"Red riding hood's red hood",
'hood',
-1,
],
],
'END Case-sensitive Offset -2' => [
'Red riding ',
[
"Red riding hood's red hood",
'hood',
-2,
],
],
'END Case-sensitive Offset 3' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'hood',
3,
],
],
'END Case-sensitive Offset -3' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'hood',
-3,
],
],
'END Case-sensitive Offset 3 with end' => [
"Red riding hood's red hood",
[
"Red riding hood's red hood",
'hood',
3,
0,
1,
],
],
'END Case-sensitive Offset -3 with end' => [
'',
[
"Red riding hood's red hood",
'hood',
-3,
0,
1,
],
],
'END Case-sensitive - No Match' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'HOOD',
],
],
'END Case-insensitive Offset 1' => [
'Red riding ',
[
"Red riding hood's red hood",
'HOOD',
1,
1,
],
],
'END Case-insensitive Offset 2' => [
"Red riding hood's red ",
[
"Red riding hood's red hood",
'HOOD',
2,
1,
],
],
'END Offset 0' => [
ExcelError::VALUE(),
[
"Red riding hood's red hood",
'hood',
0,
],
],
'Empty match positive' => [
'',
[
"Red riding hood's red hood",
'',
],
],
'Empty match negative' => [
"Red riding hood's red hood",
[
"Red riding hood's red hood",
'',
-1,
],
],
'START Case-sensitive Offset 1' => [
"Red Riding Hood's ",
[
"Red Riding Hood's red riding hood",
'red',
],
],
'START Case-insensitive Offset 1' => [
'',
[
"Red Riding Hood's red riding hood",
'red',
1,
1,
],
],
'START Case-sensitive Offset -2' => [
'',
[
"Red Riding Hood's red riding hood",
'red',
-2,
0,
1,
],
],
'START Case-insensitive Offset -2' => [
'',
[
"Red Riding Hood's red riding hood",
'red',
-2,
1,
1,
],
],
[
ExcelError::NA(),
[
'ABACADAEA',
'A',
6,
0,
0,
],
],
[
'ABACADAEA',
[
'ABACADAEA',
'A',
6,
0,
1,
],
],
[
ExcelError::NA(),
[
'Socrates',
' ',
1,
0,
0,
],
],
[
'Socrates',
[
'Socrates',
' ',
1,
0,
1,
],
],
[
'Immanuel',
[
'Immanuel Kant',
' ',
1,
0,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 1' => [
'Little ',
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
1,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 2' => [
'Little Red riding ',
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
2,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 3' => [
"Little Red riding hood's ",
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
3,
1,
],
],
'Multi-delimiter Case-Insensitive Offset -2' => [
"Little Red riding hood's ",
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
-2,
1,
],
],
'slash delimiter' => [
'How',
[
'How/about/that',
'/',
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/MID.php | tests/data/Calculation/TextData/MID.php | <?php
declare(strict_types=1);
return [
[
'',
null,
1,
1,
],
[
'',
'',
1,
1,
],
[
'#VALUE!',
'QWERTYUIOP',
0,
1,
],
[
'#VALUE!',
'QWERTYUIOP',
5,
-1,
],
[
'#VALUE!',
'QWERTYUIOP',
'NaN',
1,
],
[
'#VALUE!',
'QWERTYUIOP',
2,
'NaN',
],
'length null treated as zero' => [
'',
'QWERTYUIOP',
2,
null,
],
'length not specified' => [
'exception',
'QWERTYUIOP',
5,
],
'start not specified' => [
'exception',
'QWERTYUIOP',
],
'string not specified' => [
'exception',
],
[
'IOP',
'QWERTYUIOP',
8,
20,
],
[
'',
'QWERTYUIOP',
999,
2,
],
[
'DEF',
'ABCDEFGHI',
4,
3,
],
[
'δύο',
'Ενα δύο τρία τέσσερα πέντε',
5,
3,
],
[
'δύο τρία',
'Ενα δύο τρία τέσσερα πέντε',
5,
8,
],
[
'τρία τέσσερα',
'Ενα δύο τρία τέσσερα πέντε',
9,
12,
],
[
'R',
true,
2,
1,
],
[
'AL',
false,
2,
2,
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/DOLLAR.php | tests/data/Calculation/TextData/DOLLAR.php | <?php
declare(strict_types=1);
return [
[
'$123.46',
123.456,
2,
],
[
'$123.46',
123.456,
],
[
'$123.32',
123.321,
2,
],
[
'-$123.32',
-123.321,
2,
],
[
'$1,235,000',
1234567,
-3,
],
[
'$1,200,000',
1234567,
-5,
],
[
'-$1,200,000',
-1234567,
-5,
],
[
'#VALUE!',
'ABC',
2,
],
[
'#VALUE!',
123.456,
'ABC',
],
'omitted amount' => ['exception'],
'omitted decimals' => ['$123.46', 123.456],
'null decimals' => ['$123', 123.456, null],
'boolean decimals' => ['$123.5', 123.456, true],
'boolean value' => ['$1.00', true],
'null value' => ['$0.00', null],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/TRIM.php | tests/data/Calculation/TextData/TRIM.php | <?php
declare(strict_types=1);
return [
[
'HELLO',
'HELLO ',
],
[
'HELLO',
' HELLO',
],
[
'HELLO',
' HELLO ',
],
[
' HELLO',
' HELLO',
],
[
'HELLO WORLD',
'HELLO WORLD',
],
[
'TRUE',
true,
],
[
null,
null,
],
'no arguments' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/CODE.php | tests/data/Calculation/TextData/CODE.php | <?php
declare(strict_types=1);
// Used to test both CODE and UNICODE.
// If expected result is array, 1st entry is for CODE, 2nd for UNICODE,
// and 3rd for CODE using MACROMAN.
return [
[
'#VALUE!',
null,
],
[
'#VALUE!',
'',
],
[
65,
'ABC',
],
[
49,
123,
],
[
84,
true,
],
[
68,
'DEF',
],
[
80,
'PhpSpreadsheet',
],
[
49,
1.5,
],
[
77,
'Mark Baker',
],
[
109,
'mark baker',
],
[
163,
'£125.00',
],
[
[63, 12103],
'⽇',
],
[
[156, 0x153, 207],
'œ',
],
[
[131, 0x192, 196],
'ƒ',
],
[
[63, 0x2105],
'℅',
],
[
[63, 0x2211, 183],
'∑',
],
[
[134, 0x2020, 160],
'†',
],
[
[128, 8364, 219],
'€',
],
[
[220, 220, 134],
'Ü',
],
'non-ascii but same win-1252 vs unicode' => [
[0xD0, 0xD0, 63],
'Ð',
],
'ascii control character' => [
2,
"\x02",
],
'omitted argument' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/CLEAN.php | tests/data/Calculation/TextData/CLEAN.php | <?php
declare(strict_types=1);
return [
[
'HELLO ',
'HELLO ',
],
[
' HELLO ',
' HELLO ',
],
[
'HELLO',
' HELLO',
],
[
'HELLO WORLD',
'HELLO WORLD',
],
[
'TRUE',
true,
],
[
null,
null,
],
'omitted argument' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/LEN.php | tests/data/Calculation/TextData/LEN.php | <?php
declare(strict_types=1);
return [
[
0,
null,
],
[
0,
'',
],
[
9,
'AbCdEfGhI',
],
[
10,
'MARK BAKER',
],
[
4,
true,
],
[
5,
false,
],
'no arguments' => ['exception'],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/REPT.php | tests/data/Calculation/TextData/REPT.php | <?php
declare(strict_types=1);
return [
'no arguments' => ['exception'],
'one argument' => ['exception', 'ABC'],
['#VALUE!', 'ABC', 'DEF'],
['ABCABCABC', 'ABC', 3],
['ABCABC', 'ABC', 2.2],
['', 'ABC', 0],
['TRUETRUE', true, 2],
['111', 1, 3],
['δύο δύο ', 'δύο ', 2],
['#VALUE!', 'ABC', -1],
'result too long' => ['#VALUE!', 'A', 32768],
'result just fits' => [str_repeat('A', 32767), 'A', 32767],
'propagate NUM' => ['#NUM!', '=SQRT(-1)', 5],
'propagate REF' => ['#REF!', '=sheet99!A1', 5],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/BAHTTEXT.php | tests/data/Calculation/TextData/BAHTTEXT.php | <?php
declare(strict_types=1);
return [
[
'ศูนย์บาทถ้วน',
0,
],
[
'หนึ่งบาทถ้วน',
1,
],
[
'สองบาทถ้วน',
2,
],
[
'สิบบาทถ้วน',
10,
],
[
'สิบเอ็ดบาทถ้วน',
11,
],
[
'ยี่สิบเอ็ดบาทถ้วน',
21,
],
[
'สี่สิบสองบาทถ้วน',
42,
],
[
'หนึ่งร้อยบาทถ้วน',
100,
],
[
'หนึ่งพันบาทถ้วน',
1000,
],
[
'หนึ่งพันแปดร้อยแปดสิบเจ็ดบาทถ้วน',
1887,
],
[
'ห้าสิบสตางค์',
0.50,
],
[
'หนึ่งบาทยี่สิบห้าสตางค์',
1.25,
],
[
'หนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',
123.45,
],
[
'หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบหกสตางค์',
1234.56,
],
[
'ลบหนึ่งบาทถ้วน',
-1,
],
[
'ลบสี่สิบสามบาทถ้วน',
-42.999,
],
[
'ลบเก้าสิบเก้าบาทถ้วน',
-99,
],
[
'ลบหนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',
-123.45,
],
[
'ลบหนึ่งร้อยยี่สิบสามบาทสี่สิบห้าสตางค์',
'-123.452',
],
[
'เก้าร้อยแปดสิบเจ็ดล้านหกแสนห้าหมื่นสี่พันสามร้อยยี่สิบเอ็ดล้านเก้าแสนแปดหมื่นเจ็ดพันหกร้อยห้าสิบสี่ล้านสามแสนสองหมื่นหนึ่งพันเก้าร้อยแปดสิบเจ็ดล้านหกแสนห้าหมื่นสี่พันสามร้อยยี่สิบเอ็ดบาทถ้วน',
'987654321987654321987654321',
],
[
'หนึ่งบาทถ้วน',
true,
],
[
'ศูนย์บาทถ้วน',
false,
],
[
'#VALUE!',
'ABC',
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
PHPOffice/PhpSpreadsheet | https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/TextData/TEXTAFTER.php | tests/data/Calculation/TextData/TEXTAFTER.php | <?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
'END Case-sensitive Offset 1' => [
"'s red hood",
[
"Red riding hood's red hood",
'hood',
],
],
'END Case-sensitive Offset 2' => [
'',
[
"Red riding hood's red hood",
'hood',
2,
],
],
'END Case-sensitive Offset -1' => [
'',
[
"Red riding hood's red hood",
'hood',
-1,
],
],
'END Case-sensitive Offset -2' => [
"'s red hood",
[
"Red riding hood's red hood",
'hood',
-2,
],
],
'END Case-sensitive Offset 3' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'hood',
3,
],
],
'END Case-sensitive Offset -3' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'hood',
-3,
],
],
'END Case-sensitive Offset 3 with end' => [
'',
[
"Red riding hood's red hood",
'hood',
3,
0,
1,
],
],
'END Case-sensitive Offset -3 with end' => [
"Red riding hood's red hood",
[
"Red riding hood's red hood",
'hood',
-3,
0,
1,
],
],
'END Case-sensitive - No Match' => [
ExcelError::NA(),
[
"Red riding hood's red hood",
'HOOD',
],
],
'END Case-insensitive Offset 1' => [
"'s red hood",
[
"Red riding hood's red hood",
'HOOD',
1,
1,
],
],
'END Case-insensitive Offset 2' => [
'',
[
"Red riding hood's red hood",
'HOOD',
2,
1,
],
],
'END Offset 0' => [
ExcelError::VALUE(),
[
"Red riding hood's red hood",
'hood',
0,
],
],
'Empty match positive' => [
"Red riding hood's red hood",
[
"Red riding hood's red hood",
'',
],
],
'Empty match negative' => [
'',
[
"Red riding hood's red hood",
'',
-1,
],
],
'START Case-sensitive Offset 1' => [
' riding hood',
[
"Red Riding Hood's red riding hood",
'red',
],
],
'START Case-insensitive Offset 1' => [
" Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
1,
1,
],
],
'START Case-sensitive Offset -2' => [
"Red Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
-2,
0,
1,
],
],
'START Case-insensitive Offset -2' => [
" Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
-2,
1,
1,
],
],
[
' riding hood',
[
"Red Riding Hood's red riding hood",
'red',
1,
0,
],
],
[
" Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
1,
1,
],
],
[
"Red Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
-2,
0,
1,
],
],
[
" Riding Hood's red riding hood",
[
"Red Riding Hood's red riding hood",
'red',
-2,
1,
1,
],
],
[
ExcelError::NA(),
[
'Socrates',
' ',
1,
0,
0,
],
],
[
'',
[
'Socrates',
' ',
1,
0,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 1' => [
" riding hood's red riding hood",
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
1,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 2' => [
"'s red riding hood",
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
2,
1,
],
],
'Multi-delimiter Case-Insensitive Offset 3' => [
' riding hood',
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
3,
1,
],
],
'Multi-delimiter Case-Insensitive Offset -2' => [
' riding hood',
[
"Little Red riding hood's red riding hood",
['HOOD', 'RED'],
-2,
1,
],
],
'slash delimiter' => [
'about/that',
[
'How/about/that',
'/',
],
],
];
| php | MIT | e33834b4ea2a02088becbb41fb8954d915b46b12 | 2026-01-04T15:02:44.305364Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.