3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ini = <<<INI NUMBER = 1 TEXT = "1" DEFINED_INTEGER_CONSTANT = FOO DEFINED_BOOLEAN_CONSTANT = BAR UNDEFINED_CONSTANT = BAZ INI; declare(strict_types=1); define("FOO", 123); define("BAR", true); $ini_file = parse_ini_string($ini, false, INI_SCANNER_TYPED); foreach($ini_file as $key => $value) { define($key, $value); } var_dump(NUMBER); // => int(1) var_dump(TEXT); // => string(1) "1" var_dump(DEFINED_INTEGER_CONSTANT); // => string(3) "123" var_dump(DEFINED_BOOLEAN_CONSTANT); // => "1" var_dump(UNDEFINED_CONSTANT); // => "BAZ"

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.3.70.0080.00814.57
7.3.60.0060.00914.47
7.3.50.0150.00014.51
7.3.40.0040.01114.41
7.3.30.0130.00714.64
7.3.20.0110.00616.35
7.3.10.0060.00616.74
7.3.00.0050.00816.25
7.2.200.0030.01214.90
7.2.190.0090.00914.76
7.2.180.0080.01214.71
7.2.170.0080.00614.79
7.2.160.0080.00814.41
7.2.150.0080.00816.75
7.2.140.0040.01116.57
7.2.130.0060.00916.45
7.2.120.0000.01816.63
7.2.110.0030.01616.82
7.2.100.0060.01016.53
7.2.90.0070.00716.63
7.2.80.0090.00316.52
7.2.70.0080.01216.67
7.2.60.0120.00616.62
7.2.50.0070.01016.73
7.2.40.0070.00716.63
7.2.30.0090.00616.85
7.2.20.0060.01216.61
7.2.10.0140.00316.65
7.2.00.0070.01116.62
7.1.300.0070.00715.74
7.1.290.0030.01015.54
7.1.280.0060.00615.40
7.1.270.0040.00815.73
7.1.260.0080.00815.46
7.1.250.0000.01615.63

preferences:
141.25 ms | 1394 KiB | 7 Q