3v4l.org

run code in 200+ PHP versions simultaneously
<?php class A{ function do_stuff(&$b) { var_dump('Before in function:', $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('After 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.60.0060.00916.50
7.4.50.0000.00416.36
7.4.10.0030.01215.13
7.4.00.0090.00814.99
7.3.180.0110.00716.44
7.3.130.0130.00615.06
7.3.120.0030.01414.75
7.3.110.0080.00914.95
7.3.100.0040.01014.75
7.3.90.0080.00414.86
7.3.80.0000.01214.68
7.3.70.0040.01114.86
7.3.60.0050.00814.72
7.3.50.0020.00914.82
7.3.40.0060.00814.52
7.3.30.0050.00814.76
7.3.20.0110.00316.57
7.3.10.0070.00716.52
7.3.00.0070.00816.60
7.2.260.0110.00815.16
7.2.250.0030.01215.13
7.2.240.0030.01214.79
7.2.230.0040.01214.97
7.2.220.0020.01015.11
7.2.210.0040.00914.94
7.2.200.0060.00914.84
7.2.190.0090.00415.06
7.2.180.0040.00914.83
7.2.170.0070.00814.91
7.2.160.0050.01114.86
7.2.150.0070.01016.81
7.2.140.0030.01016.99
7.2.130.0040.00816.91
7.2.120.0070.00916.71
7.2.110.0080.00516.86
7.2.100.0060.01016.87
7.2.90.0040.01016.85
7.2.80.0100.00516.73
7.2.70.0040.00916.95
7.2.60.0050.00816.82
7.2.50.0020.00916.74
7.2.40.0040.01016.85
7.2.30.0040.01016.77
7.2.20.0090.00616.86
7.2.10.0040.00916.69
7.2.00.0060.00917.35
7.1.330.0070.00915.88
7.1.320.0060.00715.90
7.1.310.0040.01015.85
7.1.300.0080.00615.70
7.1.290.0070.00615.66
7.1.280.0050.01015.77
7.1.270.0050.00715.61
7.1.260.0090.00515.81
7.1.250.0050.00615.80
7.1.240.0060.00915.85
7.1.230.0030.01015.58
7.1.220.0080.00815.77
7.1.210.0040.01115.81
7.1.200.0030.01115.70
7.1.190.0030.01015.80
7.1.180.0000.01315.75
7.1.170.0040.00715.74
7.1.160.0080.00815.90
7.1.150.0080.00815.80
7.1.140.0100.00715.85
7.1.130.0000.01515.90
7.1.120.0030.01215.54
7.1.110.0030.01015.84
7.1.100.0040.00916.97
7.1.90.0110.00415.75
7.1.80.0040.01115.89
7.1.70.0080.00816.57
7.1.60.0080.01017.48
7.1.50.0120.00716.25
7.1.40.0030.00615.91
7.1.30.0100.00715.55
7.1.20.0070.00715.71
7.1.10.0070.00715.85
7.1.00.0020.04519.05
7.0.330.0000.01015.35
7.0.320.0060.00315.40
7.0.310.0070.01115.08
7.0.300.0030.00615.12
7.0.290.0100.00015.33
7.0.280.0060.00515.55
7.0.270.0100.00715.32
7.0.260.0070.01015.38
7.0.250.0060.00315.26
7.0.240.0040.00715.48
7.0.230.0070.00715.44
7.0.220.0060.00615.26
7.0.210.0070.00715.53
7.0.200.0040.00515.96
7.0.190.0030.01015.41
7.0.180.0030.00915.27
7.0.170.0050.00515.49
7.0.160.0030.00515.47
7.0.150.0080.00615.19
7.0.140.0050.04018.62
7.0.130.0000.01115.47
7.0.120.0060.00915.52
7.0.110.0300.04717.62
7.0.100.0320.03017.59
7.0.90.0290.04117.62
7.0.80.0280.02317.63
7.0.70.0300.04617.66
7.0.60.0330.03817.75
7.0.50.0280.04917.68
7.0.40.0040.04416.46
7.0.30.0090.04016.50
7.0.20.0080.03616.68
7.0.10.0080.02516.67
7.0.00.0100.04016.60
5.6.400.0070.00314.61
5.6.390.0000.01014.20
5.6.380.0030.00614.21
5.6.370.0000.01014.38
5.6.360.0060.00614.39
5.6.350.0090.00614.28
5.6.340.0100.00314.33
5.6.330.0030.00714.41
5.6.320.0000.01014.56
5.6.310.0090.00614.27
5.6.300.0060.00614.56
5.6.290.0030.01114.41
5.6.280.0020.04517.80
5.6.270.0070.00714.02
5.6.260.0060.04317.38
5.6.250.0100.04217.42
5.6.240.0030.02817.46
5.6.230.0050.04317.51
5.6.220.0080.03217.63
5.6.210.0110.03817.56
5.6.200.0120.04317.53
5.6.190.0070.04617.62
5.6.180.0110.03017.48
5.6.170.0110.04217.73
5.6.160.0060.04517.31
5.6.150.0110.03617.52
5.6.140.0060.04317.54
5.6.130.0020.03117.25
5.6.120.0100.04217.45
5.6.110.0060.04017.45
5.6.100.0080.03817.53
5.6.90.0020.04317.44
5.6.80.0040.04016.93
5.6.70.0040.02517.07
5.6.60.0080.04016.98
5.6.50.0050.04617.19
5.6.40.0050.02517.15
5.6.30.0080.02516.93
5.6.20.0050.05017.00
5.6.10.0070.04217.07
5.6.00.0030.04117.01
5.5.380.0080.02516.06
5.5.370.0080.02315.92
5.5.360.0050.04116.12
5.5.350.0080.04015.68
5.5.340.0030.03816.07
5.5.330.0080.04216.10
5.5.320.0070.04216.02
5.5.310.0050.03216.16
5.5.300.0060.03816.02
5.5.290.0080.03316.31
5.5.280.0070.04216.30
5.5.270.0120.04016.35
5.5.260.0030.04516.04
5.5.250.0050.05016.04
5.5.240.0030.04615.62
5.5.230.0040.03715.85
5.5.220.0080.04015.82
5.5.210.0070.04015.73
5.5.200.0150.03715.84
5.5.190.0060.04315.78
5.5.180.0070.04215.86
5.5.170.0110.00314.32
5.5.160.0060.03615.91
5.5.150.0070.04315.81
5.5.140.0030.04615.71
5.5.130.0060.04615.68
5.5.120.0080.04515.86
5.5.110.0100.04015.79
5.5.100.0070.04315.78
5.5.90.0050.02615.86
5.5.80.0070.03615.84
5.5.70.0050.04015.72
5.5.60.0050.04515.74
5.5.50.0030.03015.59
5.5.40.0070.04015.55
5.5.30.0050.04515.78
5.5.20.0080.04015.86
5.5.10.0060.03315.78
5.5.00.0090.03715.76
5.4.450.0050.04215.18
5.4.440.0070.03815.21
5.4.430.0030.03815.19
5.4.420.0050.02514.99
5.4.410.0080.03515.11
5.4.400.0060.03815.13
5.4.390.0050.04015.15
5.4.380.0030.04014.83
5.4.370.0080.03815.02
5.4.360.0000.04815.15
5.4.350.0060.03515.02
5.4.340.0090.03815.05
5.4.330.0000.00610.68
5.4.320.0100.03814.84
5.4.310.0100.03215.06
5.4.300.0030.04814.85
5.4.290.0050.04214.98
5.4.280.0030.04815.13
5.4.270.0070.03515.04
5.4.260.0040.02915.12
5.4.250.0030.04015.04
5.4.240.0050.02615.02
5.4.230.0020.02914.96
5.4.220.0070.03514.83
5.4.210.0080.03815.13
5.4.200.0050.03715.01
5.4.190.0110.03615.05
5.4.180.0080.03814.93
5.4.170.0050.04014.89
5.4.160.0050.02315.05
5.4.150.0000.02414.95
5.4.140.0070.02013.76
5.4.130.0030.01713.89
5.4.120.0050.02013.66
5.4.110.0080.01813.59
5.4.100.0020.02413.83
5.4.90.0020.02213.82
5.4.80.0000.02513.87
5.4.70.0000.02213.68
5.4.60.0020.02213.70
5.4.50.0020.02213.78
5.4.40.0070.02013.73
5.4.30.0050.01813.57
5.4.20.0050.02013.77
5.4.10.0030.02313.54
5.4.00.0070.01813.44
5.3.290.0100.07714.66
5.3.280.0030.07314.63
5.3.270.0030.04014.60
5.3.260.0000.04314.73
5.3.250.0030.03714.62
5.3.240.0070.03714.64
5.3.230.0030.03314.59
5.3.220.0000.04014.65
5.3.210.0100.05014.53
5.3.200.0000.04314.71
5.3.190.0000.04014.57
5.3.180.0100.03014.60
5.3.170.0030.04714.56
5.3.160.0030.06314.57
5.3.150.0000.04014.58
5.3.140.0070.03314.63
5.3.130.0070.03714.52
5.3.120.0100.04314.57
5.3.110.0030.06314.58
5.3.100.0000.04014.12
5.3.90.0030.03714.03
5.3.80.0070.03314.04
5.3.70.0030.03713.99
5.3.60.0070.03314.00
5.3.50.0000.03714.03
5.3.40.0070.03313.96
5.3.30.0030.04013.97
5.3.20.0100.05013.72
5.3.10.0030.03313.67
5.3.00.0030.03713.64
5.2.170.0030.03311.38
5.2.160.0000.03011.13
5.2.150.0000.05711.21
5.2.140.0070.02711.21
5.2.130.0000.03311.33
5.2.120.0070.02311.11
5.2.110.0000.03010.96
5.2.100.0000.03011.16
5.2.90.0070.03711.06
5.2.80.0030.03711.10
5.2.70.0000.03011.23
5.2.60.0000.03711.04
5.2.50.0030.02310.88
5.2.40.0030.02710.95
5.2.30.0000.03010.95
5.2.20.0030.02710.98
5.2.10.0030.03710.87
5.2.00.0030.03310.57
5.1.60.0030.02310.25
5.1.50.0030.02310.17
5.1.40.0030.02310.07
5.1.30.0030.02310.57
5.1.20.0030.03710.36
5.1.10.0070.04710.07
5.1.00.0100.04710.07
5.0.50.0100.03710.07
5.0.40.0100.04010.07
5.0.30.0070.04710.07
5.0.20.0000.03310.07
5.0.10.0030.04010.07
5.0.00.0000.05010.07
4.4.90.0000.01710.07
4.4.80.0000.01710.07
4.4.70.0030.01310.07
4.4.60.0030.01310.07
4.4.50.0000.01710.07
4.4.40.0000.02710.07
4.4.30.0000.01710.07
4.4.20.0030.03010.07
4.4.10.0000.03710.07
4.4.00.0030.03010.07
4.3.110.0130.02710.07
4.3.100.0000.03710.07
4.3.90.0000.03010.07
4.3.80.0070.05010.07
4.3.70.0030.02710.07
4.3.60.0070.02310.07
4.3.50.0030.01710.07
4.3.40.0030.02310.07
4.3.30.0030.01310.07
4.3.20.0000.01710.07
4.3.10.0000.01710.07
4.3.00.0000.01710.07