3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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.0100.01018.68
8.3.50.0150.00318.18
8.3.40.0180.00018.95
8.3.30.0000.01418.63
8.3.20.0060.00320.16
8.3.10.0040.00420.70
8.3.00.0080.00320.64
8.2.180.0160.00618.16
8.2.170.0120.00322.96
8.2.160.0100.00321.92
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0050.00320.89
8.2.120.0070.00026.35
8.2.110.0070.00322.16
8.2.100.0000.01318.16
8.2.90.0060.00319.36
8.2.80.0060.00317.97
8.2.70.0000.00917.75
8.2.60.0080.00017.93
8.2.50.0040.00418.09
8.2.40.0000.00820.42
8.2.30.0030.00619.65
8.2.20.0050.00317.91
8.2.10.0000.00818.07
8.2.00.0030.00518.13
8.1.280.0090.00925.92
8.1.270.0130.00723.79
8.1.260.0060.00328.09
8.1.250.0040.00428.09
8.1.240.0090.00020.88
8.1.230.0000.01217.82
8.1.220.0040.00417.75
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0080.00018.71
8.1.160.0000.00720.86
8.1.150.0050.00218.83
8.1.140.0050.00319.62
8.1.130.0070.00017.68
8.1.120.0040.00417.50
8.1.110.0070.00017.45
8.1.100.0040.00417.50
8.1.90.0000.00817.41
8.1.80.0000.00717.49
8.1.70.0000.00717.55
8.1.60.0000.00717.68
8.1.50.0000.00917.43
8.1.40.0090.00317.65
8.1.30.0040.00417.70
8.1.20.0030.00617.61
8.1.10.0060.00317.59
8.1.00.0030.00617.41
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0000.00717.21
8.0.260.0000.00717.21
8.0.250.0040.00617.07
8.0.240.0070.00016.93
8.0.230.0000.00817.05
8.0.220.0000.00716.97
8.0.210.0000.00716.98
8.0.200.0060.00017.07
8.0.190.0040.00417.10
8.0.180.0000.00817.05
8.0.170.0050.00517.04
8.0.160.0000.00816.88
8.0.150.0060.00316.93
8.0.140.0000.00716.94
8.0.130.0000.00613.38
8.0.120.0080.00016.91
8.0.110.0040.00417.03
8.0.100.0040.00416.96
8.0.90.0000.00717.00
8.0.80.0060.00916.99
8.0.70.0070.00016.91
8.0.60.0000.00816.82
8.0.50.0050.00316.77
8.0.30.0070.01217.39
8.0.20.0090.01017.40
8.0.10.0000.00717.15
8.0.00.0100.00916.66
7.4.330.0000.00516.70
7.4.320.0060.00016.62
7.4.300.0050.00216.55
7.4.290.0030.00316.64
7.4.280.0040.00416.46
7.4.270.0040.00416.58
7.4.260.0080.00016.60
7.4.250.0040.00416.59
7.4.240.0000.00716.46
7.4.230.0000.00716.66
7.4.220.0030.02216.50
7.4.210.0070.00716.62
7.4.200.0070.00016.65
7.4.160.0200.00416.85
7.4.150.0190.00017.40
7.4.140.0100.01017.86
7.4.130.0110.01016.64
7.4.120.0080.01516.60
7.4.110.0090.00816.41
7.4.100.0110.01116.67
7.4.90.0130.00316.62
7.4.80.0100.01419.39
7.4.70.0090.00616.68
7.4.60.0090.00816.71
7.4.50.0070.00716.45
7.4.40.0080.01116.66
7.4.30.0110.00716.52
7.4.00.0030.01315.11
7.3.330.0000.00713.27
7.3.320.0030.00313.32
7.3.310.0070.00016.41
7.3.300.0040.00416.50
7.3.290.0100.00816.46
7.3.280.0050.01216.42
7.3.270.0080.00817.40
7.3.260.0110.00816.64
7.3.250.0100.00716.60
7.3.240.0070.01216.56
7.3.230.0100.00716.67
7.3.210.0120.00616.46
7.3.200.0090.00916.62
7.3.190.0060.00916.52
7.3.180.0160.00616.58
7.3.170.0060.01016.52
7.3.160.0090.00616.47
7.3.10.0060.00716.68
7.3.00.0040.00716.80
7.2.330.0100.01016.59
7.2.320.0080.01216.77
7.2.310.0120.01216.79
7.2.300.0070.01016.86
7.2.290.0060.01616.64
7.2.130.0100.00316.63
7.2.120.0060.00616.96
7.2.110.0100.00317.05
7.2.100.0000.01517.07
7.2.90.0030.00716.93
7.2.80.0040.00717.06
7.2.70.0000.00917.12
7.2.60.0030.00916.81
7.2.50.0090.00616.90
7.2.40.0030.01016.98
7.2.30.0000.00916.89
7.2.20.0000.01117.03
7.2.10.0030.01016.63
7.2.00.0050.01118.18
7.1.250.0060.00315.76
7.1.240.0040.01115.85
7.1.230.0000.00715.88
7.1.220.0030.01315.66
7.1.210.0030.00615.92
7.1.200.0050.00715.81
7.1.190.0030.00815.58
7.1.180.0030.00515.63
7.1.170.0000.00915.83
7.1.160.0030.00715.96
7.1.150.0050.00515.55
7.1.140.0040.00415.91
7.1.130.0080.00515.87
7.1.120.0040.01115.88
7.1.110.0000.01115.93
7.1.100.0090.00317.01
7.1.90.0080.00315.90
7.1.80.0000.00915.58
7.1.70.0000.01016.24
7.1.60.0110.00517.57
7.1.50.0090.00916.30
7.1.40.0060.00615.99
7.1.30.0030.01015.69
7.1.20.0060.00615.82
7.1.10.0000.01515.82
7.1.00.0080.03819.07
7.0.330.0000.01315.20
7.0.320.0090.00315.55
7.0.310.0000.01515.25
7.0.300.0040.00415.52
7.0.290.0030.00615.45
7.0.280.0090.00015.52
7.0.270.0040.00715.31
7.0.260.0030.00715.20
7.0.250.0060.00915.47
7.0.240.0000.01215.61
7.0.230.0030.00715.65
7.0.220.0040.00715.40
7.0.210.0000.01015.60
7.0.200.0130.00814.85
7.0.190.0000.01415.34
7.0.180.0090.00315.43
7.0.170.0060.00615.47
7.0.160.0030.00915.47
7.0.150.0000.01415.55
7.0.140.0040.00415.43
7.0.130.0030.00615.28
7.0.120.0030.00615.44
7.0.110.0040.01115.32
7.0.100.0080.00415.39
7.0.90.0090.00615.50
7.0.80.0080.00615.18
7.0.70.0070.00715.50
7.0.60.0040.03218.51
7.0.50.0000.05016.76
7.0.40.0050.02816.64
7.0.30.0140.03616.86
7.0.20.0240.02516.69
7.0.10.0070.03516.78
7.0.00.0080.04816.67
5.6.380.0070.00714.46
5.6.370.0060.00914.58
5.6.360.0000.00914.08
5.6.350.0070.00714.59
5.6.340.0080.00014.46
5.6.330.0080.00414.57
5.6.320.0040.00414.61
5.6.310.0000.01414.68
5.6.300.0070.00714.23
5.6.290.0070.00714.58
5.6.280.0050.01917.73
5.6.270.0120.00414.58
5.6.260.0100.00714.11
5.6.250.0090.00614.64
5.6.240.0040.01114.64
5.6.230.0030.01314.36
5.6.220.0030.00614.29
5.6.210.0070.04617.59
5.6.200.0050.02316.34
5.6.190.0110.04217.59
5.6.180.0150.02517.50
5.6.170.0270.03217.58
5.6.160.0080.04517.47
5.6.150.0020.03116.29
5.6.140.0130.04016.26
5.6.130.0080.04216.31
5.6.120.0080.03317.69
5.6.110.0070.03317.84
5.6.100.0070.03817.69
5.6.90.0050.02517.64
5.6.80.0020.02217.40
5.6.70.0030.01214.21
5.6.60.0060.00314.32
5.6.50.0000.01414.32
5.6.40.0060.00914.10
5.6.30.0000.01514.33
5.6.20.0070.00714.41
5.6.10.0000.00814.48
5.6.00.0030.01014.49
5.5.380.0040.00911.44
5.5.370.0090.00611.22
5.5.360.0050.00511.28
5.5.350.0200.03815.79
5.5.340.0030.03414.69
5.5.330.0040.02715.83
5.5.320.0120.02515.55
5.5.310.0100.02715.83
5.5.300.0020.02514.55
5.5.290.0130.04014.56
5.5.280.0050.02416.11
5.5.270.0080.04015.76
5.5.260.0080.04315.95
5.5.250.0020.05115.86
5.5.240.0080.03815.62
5.5.230.0060.00611.22
5.5.220.0030.00911.18
5.5.210.0060.00010.88
5.5.200.0110.00011.10
5.5.190.0060.00611.19
5.5.180.0030.01011.07
5.5.170.0090.00411.03
5.5.160.0090.00311.00
5.5.150.0060.00611.16
5.5.140.0000.00711.29
5.5.130.0000.01111.19
5.5.120.0060.00311.16
5.5.110.0000.00811.15
5.5.100.0060.00011.18
5.5.90.0060.00311.41
5.5.80.0030.00311.23
5.5.70.0000.01111.00
5.5.60.0030.00611.26
5.5.50.0040.00811.23
5.5.40.0030.00611.25
5.5.30.0030.00811.20
5.5.20.0030.01010.98
5.5.10.0070.00010.91
5.5.00.0060.00611.05

preferences:
67.78 ms | 400 KiB | 5 Q