3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php // without OB echo 'before_ob' . PHP_EOL; ob_start(); // first level begins // this line will be in $second echo 'second_ob' . PHP_EOL; ob_start(); // second level begins // these 2 lines will be in $first echo 'third_ob' . PHP_EOL; echo '------' . PHP_EOL; $first = ob_get_clean() . 1; // this line will be in second // but w/o previous 2 lines echo '------' . PHP_EOL; $second = ob_get_clean() . 2; // this will output $first consisting of 2 lines. // and $second without them. var_dump($first, $second);

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)
7.1.70.0040.00816.66
7.1.60.0220.00434.82
7.1.50.0100.01434.61
7.1.40.0160.00934.17
7.1.30.0140.01034.32
7.1.20.0220.00334.48
7.1.10.0080.00416.52
7.1.00.0060.01316.54
7.0.200.0040.00716.48
7.0.190.0040.00816.61
7.0.180.0000.01415.94
7.0.170.0040.00815.98
7.0.160.0030.00916.09
7.0.150.0030.00815.97
7.0.140.0000.01215.91
7.0.130.0040.00716.54
7.0.120.0040.00716.13
7.0.110.0040.00716.08
7.0.100.0090.00316.13
7.0.90.0000.01116.13
7.0.80.0080.00416.27
7.0.70.0100.00316.05
7.0.60.0040.00815.93
7.0.50.0060.00916.02
7.0.40.0090.00316.59
7.0.30.0000.01116.34
7.0.20.0000.01216.36
7.0.10.0090.00316.53
7.0.00.0000.01216.53

preferences:
139 ms | 939 KiB | 8 Q