3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Test(){ $x=1; $y=2; echo "\n"; echo $x+$y; echo "\n"; echo "the value of x is :$x \n"; echo "the value of x is :$y"; } $x=5; $y=10; function myTest(){ global $x,$y; $y=$x+$y; echo "\n"; echo $y; echo "\n"; } function myTest2(){ $GLOBALS['y']=$GLOBALS['x']+$GLOBALS['y']; echo "\n"; echo $GLOBALS['y']; echo "\n"; } myTest2(); myTest(); Test(); echo "<h2>PHP is fun!</h2>\n"; echo "Hello world!\n"; echo "This"," string"," was"," made"," with multiple parameters"; $cars=array("Volvo","BMW","SAAB"); echo {$cars[0]}; ?>

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)
5.4.340.0050.03612.03
5.4.320.0070.04112.52
5.4.310.0070.03812.52
5.4.300.0060.03812.52
5.4.290.0100.03812.52
5.4.280.0100.03912.41
5.4.270.0080.03912.41
5.4.260.0060.04812.41
5.4.250.0070.03612.41
5.4.240.0070.03512.41
5.4.230.0040.03912.40
5.4.220.0090.03312.41
5.4.210.0060.03812.41
5.4.200.0070.03612.40
5.4.190.0090.03312.40
5.4.180.0050.03712.40
5.4.170.0080.04012.41
5.4.160.0070.04312.40
5.4.150.0040.05012.39
5.4.140.0100.05012.09
5.4.130.0110.04312.07
5.4.120.0080.03512.03
5.4.110.0040.03712.03
5.4.100.0120.04212.03
5.4.90.0070.04712.03
5.4.80.0060.03712.04
5.4.70.0070.03412.02
5.4.60.0050.03512.02
5.4.50.0030.03812.02
5.4.40.0040.04012.02
5.4.30.0040.03712.02
5.4.20.0060.03512.00
5.4.10.0070.03412.01
5.4.00.0060.03611.50
5.3.290.0090.03812.80
5.3.280.0040.04112.71
5.3.270.0070.03812.72
5.3.260.0070.04412.72
5.3.250.0050.04012.72
5.3.240.0050.03912.72
5.3.230.0050.04112.71
5.3.220.0060.03812.68
5.3.210.0080.04212.68
5.3.200.0050.03912.68
5.3.190.0070.03712.68
5.3.180.0050.03712.67
5.3.170.0050.03712.67
5.3.160.0100.03212.67
5.3.150.0100.03412.68
5.3.140.0080.03712.66
5.3.130.0090.04512.66
5.3.120.0060.04912.66
5.3.110.0080.04112.66
5.3.100.0070.03612.13
5.3.90.0070.03512.11
5.3.80.0080.03412.11
5.3.70.0100.03312.10
5.3.60.0060.03712.09
5.3.50.0080.03512.04
5.3.40.0100.03612.04
5.3.30.0070.04511.99
5.3.20.0080.03311.77
5.3.10.0050.03611.74
5.3.00.0060.03511.73
5.2.170.0100.0259.23
5.2.160.0070.0299.23
5.2.150.0030.0329.23
5.2.140.0040.0369.23
5.2.130.0080.0269.19
5.2.120.0060.0339.19
5.2.110.0030.0329.20
5.2.100.0050.0289.19
5.2.90.0040.0339.19
5.2.80.0080.0279.18
5.2.70.0080.0269.19
5.2.60.0080.0269.14
5.2.50.0040.0319.11
5.2.40.0040.0299.09
5.2.30.0030.0319.06
5.2.20.0040.0299.05
5.2.10.0050.0308.95
5.2.00.0040.0308.82
5.1.60.0050.0238.10
5.1.50.0040.0268.10
5.1.40.0030.0258.08
5.1.30.0060.0258.43
5.1.20.0030.0278.45
5.1.10.0080.0228.17
5.1.00.0070.0228.18
5.0.50.0020.0226.66
5.0.40.0030.0206.51
5.0.30.0060.0296.33
5.0.20.0010.0226.29
5.0.10.0020.0226.27
5.0.00.0020.0326.27
4.4.90.0040.0174.78
4.4.80.0070.0144.75
4.4.70.0020.0164.76
4.4.60.0020.0164.75
4.4.50.0020.0184.77
4.4.40.0020.0264.71
4.4.30.0030.0164.76
4.4.20.0030.0154.85
4.4.10.0010.0184.85
4.4.00.0030.0274.76
4.3.110.0030.0174.67
4.3.100.0050.0124.66
4.3.90.0040.0134.63
4.3.80.0040.0224.58
4.3.70.0040.0134.63
4.3.60.0040.0144.63
4.3.50.0030.0204.63
4.3.40.0030.0254.54
4.3.30.0040.0133.32
4.3.20.0010.0173.30
4.3.10.0020.0153.25
4.3.00.0130.0237.30

preferences:
141.84 ms | 1394 KiB | 7 Q