3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("display_errors","On"); error_reporting(E_ALL); function without($var){ echo "Certain death\n"; $var.='die fucker DIE!'; echo memory_get_usage(), PHP_EOL; } function with(&$var){ echo "Alive\n"; echo memory_get_usage(), PHP_EOL; } $str = str_repeat('foo', 1000000); echo memory_get_usage(), PHP_EOL; echo "END\n"; without($str); with($str);

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.2.00.0030.01224.45
7.1.70.0060.00322.71
7.1.60.0170.01022.90
7.1.50.0030.01422.67
7.1.00.0100.07027.85
7.0.200.0130.00322.38
7.0.140.0030.07727.75
7.0.60.0130.07025.59
7.0.50.0000.06323.45
7.0.40.0070.07325.57
7.0.30.0500.05025.52
7.0.20.0370.08025.46
7.0.10.0400.07325.61
7.0.00.0030.09725.46
5.6.280.0030.07726.70
5.6.210.0200.07726.33
5.6.200.0100.08723.86
5.6.190.0130.07025.97
5.6.180.0530.06726.02
5.6.170.0300.08025.99
5.6.160.0130.05726.09
5.6.150.0130.07023.82
5.6.140.0070.04723.90
5.6.130.0130.04323.82
5.6.120.0130.03726.71
5.6.110.0130.03726.79
5.6.100.0170.07326.71
5.6.90.0070.04726.67
5.6.80.0130.08025.96
5.6.70.5130.04326.03
5.5.350.0170.05026.09
5.5.340.0170.07323.63
5.5.330.0070.06725.86
5.5.320.0500.07725.78
5.5.310.0400.07025.78
5.5.300.0100.03323.66
5.5.290.0200.07023.66
5.5.280.0100.04026.40
5.5.270.0100.05026.55
5.5.260.0130.05026.43
5.5.250.0100.04026.26
5.5.240.0100.07025.77
5.4.450.0200.05025.06
5.4.440.0430.04725.03
5.4.430.0370.05025.00
5.4.420.0270.04324.81
5.4.410.0270.04324.88
5.4.400.0470.04024.64
5.4.390.0430.04024.67
5.4.380.0670.07024.43
5.4.370.0430.06024.38
5.4.360.0530.05024.28
5.4.350.0470.06324.38
5.4.340.0270.07024.23
5.4.320.0080.03718.17
5.4.310.0100.03618.17
5.4.300.0080.03618.17
5.4.290.0080.03818.16
5.4.280.0090.03618.06
5.4.270.0110.03518.06
5.4.260.0090.03718.06
5.4.250.0070.04318.06
5.4.240.0050.03918.07
5.4.230.0080.03918.05
5.4.220.0060.04018.06
5.4.210.0060.03818.05
5.4.200.0070.03918.06
5.4.190.0110.03318.05
5.4.180.0060.03818.05
5.4.170.0050.04618.06
5.4.160.0080.03718.05
5.4.150.0070.03818.05
5.4.140.0080.03817.73
5.4.130.0110.04517.72
5.4.120.0100.04717.68
5.4.110.0080.03917.67
5.4.100.0120.04317.68
5.4.90.0120.05017.68
5.4.80.0090.04017.68
5.4.70.0080.03617.67
5.4.60.0120.03317.67
5.4.50.0050.03917.67
5.4.40.0120.04417.66
5.4.30.0090.03717.66
5.4.20.0060.04917.66
5.4.10.0090.04117.66
5.4.00.0080.04917.14
5.3.290.0070.05718.38
5.3.280.0090.03718.30
5.3.270.0080.04018.32
5.3.260.0080.04118.31
5.3.250.0090.03718.31
5.3.240.0050.04218.31
5.3.230.0060.04118.30
5.3.220.0120.03518.27
5.3.210.0070.04118.28
5.3.200.0070.03918.27
5.3.190.0070.03918.28
5.3.180.0100.03418.27
5.3.170.0050.04118.27
5.3.160.0070.03818.27
5.3.150.0070.04018.27
5.3.140.0060.03818.26
5.3.130.0100.05218.25
5.3.120.0060.04218.26
5.3.110.0040.04418.25
5.3.100.0090.03717.75
5.3.90.0070.03817.73
5.3.80.0060.03917.73
5.3.70.0050.04017.72
5.3.60.0100.04117.71
5.3.50.0090.03717.65
5.3.40.0080.04517.66
5.3.30.0110.03917.61
5.3.20.0090.03517.39
5.3.10.0080.03517.36
5.3.00.0090.03717.35
5.2.170.0050.03314.84
5.2.160.0090.02914.84
5.2.150.0060.04214.84
5.2.140.0080.03014.84
5.2.130.0030.03414.79
5.2.120.0090.02514.80
5.2.110.0030.03314.80
5.2.100.0060.02914.79
5.2.90.0080.02914.79
5.2.80.0060.03114.78
5.2.70.0080.02914.79
5.2.60.0090.03014.75
5.2.50.0030.03314.71
5.2.40.0070.02914.69
5.2.30.0100.02714.66
5.2.20.0060.03014.64
5.2.10.0120.02314.55
5.2.00.0090.02511.59
5.1.60.0030.02610.87
5.1.50.0070.03210.87
5.1.40.0090.03810.84
5.1.30.0100.03411.19
5.1.20.0060.04011.21
5.1.10.0040.03010.95
5.1.00.0050.02810.95
5.0.50.0080.0199.42
5.0.40.0060.0199.28
5.0.30.0050.0329.10
5.0.20.0040.0209.05
5.0.10.0030.0229.04
5.0.00.0040.0329.03
4.4.90.0030.0167.46
4.4.80.0030.0167.44
4.4.70.0030.0167.44
4.4.60.0010.0187.44
4.4.50.0040.0157.45
4.4.40.0020.0277.45
4.4.30.0050.0207.44
4.4.20.0030.0177.51
4.4.10.0030.0167.51
4.4.00.0030.0257.47
4.3.110.0030.0217.38
4.3.100.0050.0137.38
4.3.90.0030.0207.36
4.3.80.0040.0327.36
4.3.70.0040.0157.35
4.3.60.0050.0147.36
4.3.50.0020.0197.34
4.3.40.0020.0307.30
4.3.30.0030.0166.11
4.3.20.0020.0186.09
4.3.10.0020.0166.05
4.3.00.0070.01318.23

preferences:
37.55 ms | 400 KiB | 5 Q