3v4l.org

run code in 200+ PHP versions simultaneously
<?php class A{ function do_stuff(&$b) { $defined = 0; #trigger_error("If I fixed the undefined variable but enabled this line instead, it will also turn b from an object into a string! So user-triggered notices bork it as well."); $x = $undefined || $defined ? 14 : 0; var_dump('In function:', $b); } } class B{} $a = new A(); $b = new B(); $a->do_stuff($b); var_dump('After function:', $b);

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.4.10.0090.00715.07
7.4.00.0080.00814.94
7.3.130.0040.01414.79
7.3.120.0110.00714.80
7.3.110.0090.00914.73
7.3.100.0050.00714.81
7.3.90.0060.00614.79
7.3.80.0100.00214.98
7.3.70.0070.00614.76
7.3.60.0120.00314.76
7.3.50.0080.00414.50
7.3.40.0040.00914.70
7.3.30.0080.00514.80
7.3.20.0060.00716.71
7.3.10.0100.00316.50
7.3.00.0090.00516.59
7.2.260.0030.01515.08
7.2.250.0040.01014.92
7.2.240.0070.00815.01
7.2.230.0040.01014.85
7.2.220.0050.00715.02
7.2.210.0070.00514.95
7.2.200.0060.00914.99
7.2.190.0060.00714.93
7.2.180.0070.00614.68
7.2.170.0050.01014.78
7.2.160.0020.01114.83
7.2.150.0070.00516.72
7.2.140.0080.00816.89
7.2.130.0050.00816.91
7.2.120.0050.01016.93
7.2.110.0070.01017.01
7.2.100.0050.00916.71
7.2.90.0110.00516.96
7.2.80.0020.00816.68
7.2.70.0050.01116.77
7.2.60.0070.00616.80
7.2.50.0070.00416.81
7.2.40.0070.00916.93
7.2.30.0040.01116.97
7.2.20.0090.00116.90
7.2.10.0070.00516.80
7.2.00.0090.00617.57
7.1.330.0080.00515.73
7.1.320.0060.00615.69
7.1.310.0050.00815.74
7.1.300.0080.00515.62
7.1.290.0040.00915.87
7.1.280.0040.00615.90
7.1.270.0070.00515.79
7.1.260.0080.00115.53
7.1.250.0030.01015.72
7.1.240.0060.00815.76
7.1.230.0070.00615.86
7.1.220.0030.01015.79
7.1.210.0080.00515.77
7.1.200.0060.00515.78
7.1.190.0070.00515.92
7.1.180.0090.00515.72
7.1.170.0020.01015.72
7.1.160.0070.00415.63
7.1.150.0040.01315.79
7.1.140.0000.01015.83
7.1.130.0090.00515.83
7.1.120.0000.01215.84
7.1.110.0030.01015.81
7.1.100.0020.00716.44
7.1.90.0050.00915.86
7.1.80.0070.00915.70
7.1.70.0070.00616.36
7.1.60.0030.00917.03
7.1.50.0070.00916.10
7.1.40.0060.00615.72
7.1.30.0020.01215.73
7.1.20.0100.00415.85
7.1.10.0020.01015.73
7.1.00.0060.02817.94
7.0.330.0030.01015.29
7.0.320.0050.00815.34
7.0.310.0080.00715.34
7.0.300.0060.00615.53
7.0.290.0080.00615.34
7.0.280.0130.00415.24
7.0.270.0060.00915.21
7.0.260.0050.00715.26
7.0.250.0050.00815.38
7.0.240.0060.00615.44
7.0.230.0070.00515.33
7.0.220.0060.00615.50
7.0.210.0030.00815.38
7.0.200.0050.00615.77
7.0.190.0050.00415.30
7.0.180.0070.00815.23
7.0.170.0030.01115.50
7.0.160.0020.00915.22
7.0.150.0100.00615.46
7.0.140.0070.02817.57
7.0.130.0040.00715.48
7.0.120.0050.00915.53
7.0.110.0030.00915.44
7.0.100.0030.01816.92
7.0.90.0050.01716.79
7.0.80.0050.03416.96
7.0.70.0030.02016.83
7.0.60.0090.01816.91
7.0.50.0060.01517.00
7.0.40.0050.02215.65
7.0.30.0050.01815.66
7.0.20.0070.01615.68
7.0.10.0040.02215.61
7.0.00.0100.01415.63
5.6.400.0030.00914.31
5.6.390.0030.00914.54
5.6.380.0080.00414.39
5.6.370.0030.01114.45
5.6.360.0030.00814.45
5.6.350.0080.00714.40
5.6.340.0080.00214.34
5.6.330.0020.01414.37
5.6.320.0030.01314.25
5.6.310.0070.00714.42
5.6.300.0060.00614.44
5.6.290.0030.00714.40
5.6.280.0030.03016.59
5.6.270.0050.00714.29
5.6.260.0030.00714.43
5.6.250.0070.02216.53
5.6.240.0070.01816.48
5.6.230.0060.01916.38
5.6.220.0070.01416.49
5.6.210.0050.02116.28
5.6.200.0040.01716.54
5.6.190.0070.01816.58
5.6.180.0030.02016.54
5.6.170.0040.02116.54
5.6.160.0030.02016.46
5.6.150.0030.02116.53
5.6.140.0070.01516.54
5.6.130.0030.01916.48
5.6.120.0060.02116.50
5.6.110.0050.01616.58
5.6.100.0110.01516.51
5.6.90.0090.01716.53
5.6.80.0080.01616.41
5.6.70.0050.01916.20
5.6.60.0100.01516.37
5.6.50.0010.02316.25
5.6.40.0050.01516.36
5.6.30.0100.02916.25
5.6.20.0080.02716.23
5.6.10.0080.01916.25
5.6.00.0040.02116.26
5.5.380.0040.01916.44
5.5.370.0050.01616.21
5.5.360.0050.02216.15
5.5.350.0060.02116.22
5.5.340.0030.01816.49
5.5.330.0070.02216.36
5.5.320.0030.01816.40
5.5.310.0030.02216.43
5.5.300.0030.02016.21
5.5.290.0080.01316.49
5.5.280.0040.02016.40
5.5.270.0040.01916.32
5.5.260.0060.01916.46
5.5.250.0050.02216.29
5.5.240.0070.01516.21
5.5.230.0070.01316.17
5.5.220.0060.01816.17
5.5.210.0070.01416.31
5.5.200.0060.02116.23
5.5.190.0060.03116.19
5.5.180.0040.02516.12
5.5.170.0020.01313.95
5.5.160.0030.02816.21
5.5.150.0030.02616.05
5.5.140.0110.02816.09
5.5.130.0070.02016.25
5.5.120.0050.02416.09
5.5.110.0070.02715.95
5.5.100.0070.02916.12
5.5.90.0030.02816.16
5.5.80.0040.01816.04
5.5.70.0050.01915.98
5.5.60.0060.02316.12
5.5.50.0080.03316.25
5.5.40.0070.02616.09
5.5.30.0080.02916.16
5.5.20.0050.03316.17
5.5.10.0030.02816.02
5.5.00.0080.01716.03
5.4.450.0050.01714.34
5.4.440.0060.01214.18
5.4.430.0030.01914.16
5.4.420.0030.01914.21
5.4.410.0080.01314.01
5.4.400.0020.01414.08
5.4.390.0020.01914.16
5.4.380.0020.01914.11
5.4.370.0040.02514.10
5.4.360.0060.02514.03
5.4.350.0050.02914.12
5.4.340.0020.02014.07
5.4.330.0030.00811.50
5.4.320.0020.03314.09
5.4.310.0050.03114.08
5.4.300.0050.02214.10
5.4.290.0030.01914.04
5.4.280.0070.01614.14
5.4.270.0050.03014.02
5.4.260.0060.02714.05
5.4.250.0040.01714.03
5.4.240.0070.02814.01
5.4.230.0060.02714.09
5.4.220.0070.02814.09
5.4.210.0090.01313.97
5.4.200.0030.01614.05
5.4.190.0040.02314.09
5.4.180.0050.02514.05
5.4.170.0050.03113.99
5.4.160.0020.01913.95
5.4.150.0060.02313.99
5.4.140.0010.02013.27
5.4.130.0010.02913.12
5.4.120.0090.01713.22
5.4.110.0040.03413.12
5.4.100.0030.02813.13
5.4.90.0050.02913.25
5.4.80.0020.03213.21
5.4.70.0050.02313.08
5.4.60.0030.01913.23
5.4.50.0020.02213.29
5.4.40.0040.02613.19
5.4.30.0080.02713.19
5.4.20.0110.01713.16
5.4.10.0050.03213.12
5.4.00.0080.02412.92
5.3.290.0100.06714.59
5.3.280.0130.07314.71
5.3.270.0070.04314.65
5.3.260.0030.05714.67
5.3.250.0130.04314.61
5.3.240.0100.07714.66
5.3.230.0070.06014.65
5.3.220.0130.07014.57
5.3.210.0170.06714.67
5.3.200.0030.07714.53
5.3.190.0100.07014.63
5.3.180.0100.07014.49
5.3.170.0030.06714.68
5.3.160.0200.06014.68
5.3.150.0100.07014.51
5.3.140.0070.07314.69
5.3.130.0030.04314.57
5.3.120.0030.07014.47
5.3.110.0030.05314.56
5.3.100.0100.07314.09
5.3.90.0070.08014.09
5.3.80.0070.07313.94
5.3.70.0070.04314.08
5.3.60.0070.03713.99
5.3.50.0100.03313.88
5.3.40.0100.04313.94
5.3.30.0030.05314.01
5.3.20.0000.07313.75
5.3.10.0030.04013.79
5.3.00.0130.03713.62
5.2.170.0030.06011.57
5.2.160.0070.06011.57
5.2.150.0070.06011.57
5.2.140.0070.03711.57
5.2.130.0100.04711.57
5.2.120.0100.05711.57
5.2.110.0070.03711.57
5.2.100.0000.03711.57
5.2.90.0030.04711.57
5.2.80.0070.04711.57
5.2.70.0030.03711.57
5.2.60.0030.06011.57
5.2.50.0070.06311.57
5.2.40.0070.06711.57
5.2.30.0030.04711.57
5.2.20.0030.06011.57
5.2.10.0070.05711.57
5.2.00.0100.04011.57
5.1.60.0070.04311.57
5.1.50.0030.04311.57
5.1.40.0130.03711.57
5.1.30.0130.04711.57
5.1.20.0030.05011.57
5.1.10.0070.05311.57
5.1.00.0030.03011.57
5.0.50.0070.04011.57
5.0.40.0070.04011.57
5.0.30.0070.06711.57
5.0.20.0000.04011.57
5.0.10.0000.02711.57
5.0.00.0000.03711.57
4.4.90.0070.03011.57
4.4.80.0000.03011.57
4.4.70.0070.02311.57
4.4.60.0030.02011.57
4.4.50.0030.03311.57
4.4.40.0000.03011.57
4.4.30.0070.03011.57
4.4.20.0100.02711.57
4.4.10.0030.03311.57
4.4.00.0000.06011.57
4.3.110.0000.03711.57
4.3.100.0000.03711.57
4.3.90.0030.03711.57
4.3.80.0030.05011.57
4.3.70.0100.02711.57
4.3.60.0030.01711.57
4.3.50.0000.02311.57
4.3.40.0000.05011.57
4.3.30.0070.03011.57
4.3.20.0030.03011.57
4.3.10.0000.03311.57
4.3.00.0000.02711.57