3v4l.org

run code in 300+ PHP versions simultaneously
<?php unlink('/tmp/test.phar'); $phar = new Phar('/tmp/test.phar'); $phar->startBuffering(); $phar->addFromString('1.php', 'test'); $phar->addFromString('2.php', 'test'); $phar->addFromString('inner/3.php', 'test'); $phar->stopBuffering(); $phar->rewind(); // string(24) "phar:///tmp/test.phar/" var_dump($phar->key()); // Не выведет ничего // foreach ($phar as $k => $v) { /* ... */ } // А так выведет foreach ($phar->getChildren() as $k => $v) { var_dump($k); var_dump($v); } // А так выведет даже с подкаталогами $iter = new RecursiveIteratorIterator($phar->getChildren()); foreach ($iter as $k => $v) { var_dump($k); var_dump($v); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.120.0120.00820.46
8.4.110.0150.00522.30
8.4.100.0120.00517.97
8.4.90.0060.00318.88
8.4.80.0140.00618.16
8.4.70.0170.00418.09
8.4.60.0100.01018.59
8.4.50.0080.00817.75
8.4.40.0160.00318.56
8.4.30.0070.01320.38
8.4.20.0070.01419.78
8.4.10.0040.00419.63
8.3.250.0080.01118.76
8.3.240.0110.00816.71
8.3.230.0120.00716.59
8.3.220.0110.00917.29
8.3.210.0120.00716.69
8.3.200.0050.00416.64
8.3.190.0100.01017.05
8.3.180.0070.00818.42
8.3.170.0080.00022.73
8.3.160.0130.00716.92
8.3.150.0150.00416.98
8.3.140.0080.00016.53
8.3.130.0040.00418.54
8.3.120.0050.00520.39
8.3.110.0040.00420.94
8.3.100.0090.00024.06
8.3.90.0050.00326.77
8.3.80.0040.00417.97
8.3.70.0090.00616.50
8.3.60.0140.00825.92
8.3.50.0100.01025.92
8.3.40.0120.00325.92
8.2.290.0110.00820.48
8.2.280.0070.00218.57
8.2.270.0040.01118.93
8.2.260.0030.00716.86
8.2.250.0130.00616.50
8.2.240.0060.01016.85
8.2.230.0050.00322.58
8.2.220.0100.01037.54
8.2.210.0140.00026.77
8.2.200.0000.01018.41
8.2.190.0150.00318.66
8.2.180.0110.00425.92
8.2.170.0110.00425.92
8.1.330.0050.00422.04
8.1.320.0040.00520.02
8.1.310.0060.00318.09
8.1.300.0070.00418.41
8.1.290.0110.00030.84
8.1.280.0140.00725.92

preferences:
53.16 ms | 403 KiB | 5 Q