3v4l.org

run code in 300+ PHP versions simultaneously
<?php curl_setopt($ch, CURLOPT_URL, “http://www.example.com/”); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); $var = "testing module"; $statement = 'This is a $var'; echo ($statement); $var = "testing module"; $statement = "This is a $var"; echo ($statement); $arr = array("foo","bar","baz"); for ( $i = 0; $i < count($arr); $i++){ $item = $arr[$i]; } echo "<pre>"; print_r($item); echo "</pre>"; $a = 3; print '$a'; echo '$a'; $array = array(array(141,151,161), 2, 3, array(101, 202, 303)); function DisplayArray($array) { foreach ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value . " "; } } } DisplayArray($array); echo 0x10; ?>

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.0.20.0270.07720.07
7.0.10.0130.03720.06
7.0.00.0130.07720.12
5.6.170.0300.07720.71
5.6.160.0130.08320.50
5.6.150.0100.04318.21
5.6.140.0100.03718.24
5.6.130.0100.07318.21
5.6.120.0030.07021.03
5.6.110.0100.08321.04
5.6.100.0070.05321.13
5.6.90.0100.07321.00
5.6.80.0100.07320.38
5.5.310.0270.03320.24
5.5.300.0100.03718.00
5.5.290.0100.08317.98
5.5.280.0200.07020.65
5.5.270.0100.04320.86
5.5.260.0030.04320.85
5.5.250.0130.06320.79
5.5.240.0000.07720.25

preferences:
148 ms | 1394 KiB | 7 Q