3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 4; $i <= 6; print $i ++); $i=4; $j=30; $k=0; $k=$j++/$i++; echo $i . ' ' . $j . ' ' . $k . ' ' ."\r\n"; $aa = 10; echo 'Value of a = $a'."\r\n"; $a = array( 1=> 'one', 2 => 'two', 3 => 'three'); unset( $a[2] ); print_r($a[2]); print_r($a[3]); $great = 'fantastic'; echo "This is {$great}"; $var1="a"; $$var1="b"; echo "$var1 $a"; class Insurance{ function clsNAme(){ echo get_class($this); } } print 5+2 * 4+6; $cl = new Insurance(); $cl->clsName(); Insurance::clsName(); var_dump (3*4); $ch = curl_init(); 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><br/>\r\n"; $a = 3; print '$a'."\r\n"; echo '$a'."\r\n"; print "$a\r\n"; echo "$a\r\n"; $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)
8.3.60.0090.01218.68
8.3.50.0060.00917.90
8.3.40.0090.00918.84
8.3.30.0040.01118.84
8.3.20.0060.00320.16
8.3.10.0030.00620.48
8.3.00.0080.00320.55
8.2.180.0000.01818.54
8.2.170.0090.00622.96
8.2.160.0110.00321.99
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00720.78
8.2.120.0050.00326.35
8.2.110.0060.00622.31
8.2.100.0090.00317.91
8.2.90.0050.00318.16
8.2.80.0000.00817.97
8.2.70.0030.00517.75
8.2.60.0000.00818.03
8.2.50.0090.00318.09
8.2.40.0050.00520.61
8.2.30.0040.00419.54
8.2.20.0040.00417.72
8.2.10.0050.00318.03
8.2.00.0000.00718.16
8.1.280.0090.01225.92
8.1.270.0140.00423.87
8.1.260.0080.00028.09
8.1.250.0030.00528.09
8.1.240.0100.00022.14
8.1.230.0060.00620.99
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0030.00518.72
8.1.160.0000.00720.77
8.1.150.0030.00620.59
8.1.140.0090.00019.63
8.1.130.0030.00619.22
8.1.120.0000.00717.48
8.1.110.0090.00017.53
8.1.100.0080.00017.47
8.1.90.0070.00017.48
8.1.80.0000.00717.52
8.1.70.0040.00417.39
8.1.60.0080.00017.61
8.1.50.0040.00417.52
8.1.40.0110.00017.52
8.1.30.0000.00817.73
8.1.20.0000.00717.59
8.1.10.0040.00417.60
8.1.00.0020.00517.59
8.0.300.0070.00020.22
8.0.290.0000.00816.88
8.0.280.0070.00018.36
8.0.270.0050.00317.20
8.0.260.0050.00316.84
8.0.250.0000.00716.95
8.0.240.0080.00017.05
8.0.230.0070.00017.08
8.0.220.0030.00317.02
8.0.210.0000.00716.98
8.0.200.0000.00617.06
8.0.190.0050.00317.01
8.0.180.0050.00316.92
8.0.170.0000.00816.99
8.0.160.0000.00817.06
8.0.150.0040.00416.94
8.0.140.0000.00717.03
8.0.130.0030.00313.44
8.0.120.0030.00616.99
8.0.110.0030.00617.04
8.0.100.0070.00016.99
8.0.90.0000.00816.99
8.0.80.0060.00917.03
8.0.70.0000.00816.89
8.0.60.0030.00517.06
8.0.50.0040.00417.02
8.0.30.0090.00917.10
8.0.20.0070.01217.42
8.0.10.0000.00816.98
8.0.00.0120.00716.92
7.4.330.0060.00016.71
7.4.320.0070.00016.61
7.4.300.0000.00616.63
7.4.290.0000.00716.64
7.4.280.0070.00016.68
7.4.270.0030.00316.59
7.4.260.0060.00316.55
7.4.250.0040.00416.65
7.4.240.0000.00716.55
7.4.230.0000.00716.57
7.4.220.0100.01016.73
7.4.210.0100.01016.75
7.4.200.0070.00016.62
7.4.160.0060.01016.36
7.4.150.0180.00017.40
7.4.140.0090.01217.86
7.4.130.0120.01216.57
7.4.120.0080.00916.47
7.4.110.0160.00416.68
7.4.100.0030.01416.62
7.4.90.0080.01216.63
7.4.80.0120.00919.39
7.4.70.0060.01216.71
7.4.60.0050.01116.45
7.4.50.0030.00916.53
7.4.40.0090.00916.64
7.4.30.0110.01416.50
7.4.00.0040.01015.02
7.3.330.0030.00313.45
7.3.320.0000.00713.32
7.3.310.0040.00416.32
7.3.300.0040.00416.33
7.3.290.0080.01016.44
7.3.280.0090.01016.44
7.3.270.0080.00817.40
7.3.260.0030.01416.37
7.3.250.0090.00916.61
7.3.240.0080.00916.58
7.3.230.0140.00316.64
7.3.210.0120.00616.46
7.3.200.0120.00616.55
7.3.190.0110.00616.36
7.3.180.0090.00616.41
7.3.170.0140.00516.36
7.3.160.0120.00416.63
7.3.120.0070.01115.13
7.3.110.0070.01114.84
7.3.100.0030.01014.48
7.3.90.0060.00314.59
7.3.80.0030.01414.99
7.3.70.0000.00914.93
7.3.60.0040.00814.90
7.3.50.0030.01215.01
7.3.40.0090.00614.70
7.3.30.0030.01014.84
7.3.20.0070.00316.86
7.3.10.0090.00016.74
7.3.00.0000.01316.64
7.2.330.0100.00816.85
7.2.320.0160.00316.73
7.2.310.0040.01216.82
7.2.300.0060.01116.71
7.2.290.0030.01716.58
7.2.250.0090.00915.27
7.2.240.0070.01015.43
7.2.230.0080.00814.78
7.2.220.0000.01415.25
7.2.210.0000.01415.18
7.2.200.0040.01115.36
7.2.190.0110.00315.16
7.2.180.0070.00715.02
7.2.170.0060.00615.20
7.2.60.0040.01117.02
7.2.00.0000.01619.49
7.1.330.0130.00015.98
7.1.320.0030.01315.61
7.1.310.0070.00715.59
7.1.300.0070.01115.90
7.1.290.0030.00615.82
7.1.280.0070.00415.77
7.1.270.0120.00315.75
7.1.260.0070.00715.88
7.1.200.0070.00715.68
7.1.100.0040.01118.13
7.1.70.0040.00416.88
7.1.60.0100.01319.27
7.1.50.0000.02217.02
7.1.00.0000.07722.50
7.0.200.0420.01014.59
7.0.60.0030.08321.63
7.0.50.0070.05317.90
7.0.40.0170.05720.30
7.0.30.0230.07720.25
7.0.20.0370.07320.26
7.0.10.0070.04720.15
7.0.00.0200.07720.09
5.6.280.0030.03320.91
5.6.210.0130.08020.73
5.6.200.0070.07018.18
5.6.190.0030.07020.46
5.6.180.0330.05720.63
5.6.170.0300.04720.48
5.6.160.0170.07320.43
5.6.150.0070.05018.21
5.6.140.0170.07318.14
5.6.130.0000.07018.17
5.6.120.0070.07320.96
5.6.110.0030.04321.07
5.6.100.0170.07321.02
5.6.90.0100.08321.15
5.6.80.0070.06320.40
5.5.350.4130.04720.32
5.5.340.0070.07717.96
5.5.330.0000.04320.32
5.5.320.0270.06020.38
5.5.310.0300.06320.35
5.5.300.0030.07017.95
5.5.290.0100.03718.06
5.5.280.0030.08320.83
5.5.270.0030.04320.82
5.5.260.0000.07320.99
5.5.250.0100.04720.60
5.5.240.0070.03720.17

preferences:
57.79 ms | 400 KiB | 5 Q