3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function y() { $GLOBALS['x'] = null; return true; } public function z() { echo "Hello World\n"; } } function nullthrows($x) { if ($x === null) { throw new Exception('Unexpected null'); } return $x; } function foo($x) { if ($x && $x->y()) { nullthrows($x)->z(); } } $GLOBALS['x'] = new A(); $x = &$GLOBALS['x']; foo($x);

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.0070.01716.63
8.3.50.0070.00716.36
8.3.40.0110.01118.85
8.3.30.0080.00318.82
8.3.20.0040.00420.38
8.3.10.0060.00323.51
8.3.00.0040.00422.14
8.2.180.0070.01016.75
8.2.170.0120.00322.96
8.2.160.0070.00719.09
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00020.92
8.2.120.0070.00026.35
8.2.110.0030.00622.26
8.2.100.0090.00317.78
8.2.90.0040.00417.84
8.2.80.0080.00017.97
8.2.70.0030.00617.38
8.2.60.0000.00718.04
8.2.50.0080.00018.10
8.2.40.0000.00720.53
8.2.30.0040.00419.32
8.2.20.0000.00818.19
8.2.10.0070.00018.04
8.2.00.0050.00318.17
8.1.280.0090.01225.92
8.1.270.0060.00322.23
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.92
8.1.230.0080.00420.89
8.1.220.0030.00517.74
8.1.210.0000.00818.86
8.1.200.0110.00017.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0000.00818.88
8.1.160.0000.00719.02
8.1.150.0040.00418.81
8.1.140.0000.00719.58
8.1.130.0030.00318.77
8.1.120.0000.00717.45
8.1.110.0070.00017.43
8.1.100.0000.00817.36
8.1.90.0000.00717.46
8.1.80.0000.00817.49
8.1.70.0000.00717.34
8.1.60.0040.00417.59
8.1.50.0030.00517.41
8.1.40.0040.00417.39
8.1.30.0060.00317.62
8.1.20.0040.00417.55
8.1.10.0060.00317.65
8.1.00.0030.00617.48
8.0.300.0000.00720.03
8.0.290.0070.00016.63
8.0.280.0000.00718.33
8.0.270.0030.00317.32
8.0.260.0060.00016.87
8.0.250.0030.00316.98
8.0.240.0060.00317.00
8.0.230.0000.00717.01
8.0.220.0030.00316.80
8.0.210.0040.00416.80
8.0.200.0040.00416.85
8.0.190.0060.00316.89
8.0.180.0040.00716.81
8.0.170.0030.00316.79
8.0.160.0000.00716.93
8.0.150.0040.00316.80
8.0.140.0070.00016.77
8.0.130.0060.00313.31
8.0.120.0040.00416.89
8.0.110.0000.00816.75
8.0.100.0000.00716.82
8.0.90.0000.00716.73
8.0.80.0130.00316.86
8.0.70.0040.00416.84
8.0.60.0040.00416.93
8.0.50.0040.00416.90
8.0.30.0110.00617.15
8.0.20.0080.01017.40
8.0.10.0040.00416.88
8.0.00.0120.00616.89
7.4.330.0000.00715.55
7.4.320.0060.00016.63
7.4.300.0000.00616.66
7.4.290.0050.00316.55
7.4.280.0040.00416.49
7.4.270.0040.00416.65
7.4.260.0000.00716.46
7.4.250.0030.00316.56
7.4.240.0030.00316.60
7.4.230.0000.00716.54
7.4.220.0140.00516.59
7.4.210.0110.00316.58
7.4.200.0030.00316.49
7.4.160.0100.00616.49
7.4.150.0140.00317.40
7.4.140.0090.00817.86
7.4.130.0060.01116.48
7.4.120.0100.00816.55
7.4.110.0140.00416.42
7.4.100.0030.01516.52
7.4.90.0060.01216.58
7.4.80.0080.00819.39
7.4.70.0110.00616.53
7.4.60.0090.00616.50
7.4.50.0000.01616.69
7.4.40.0030.01216.36
7.4.30.0140.00316.56
7.4.00.0110.00415.18
7.3.330.0060.00313.23
7.3.320.0030.00213.45
7.3.310.0030.00316.38
7.3.300.0030.00316.21
7.3.290.0050.00816.35
7.3.280.0090.00816.36
7.3.270.0070.01017.40
7.3.260.0100.01216.40
7.3.250.0070.01116.38
7.3.240.0090.00816.41
7.3.230.0160.00616.45
7.3.210.0130.00316.36
7.3.200.0070.01416.56
7.3.190.0130.00616.64
7.3.180.0130.00716.43
7.3.170.0100.00716.60
7.3.160.0060.01616.52
7.2.330.0110.00616.86
7.2.320.0100.00716.83
7.2.310.0110.00616.56
7.2.300.0080.00816.54
7.2.290.0100.01016.86
7.2.60.0070.01016.78
7.2.00.0030.01219.68
7.1.200.0040.00815.98
7.1.100.0150.00916.22
7.1.70.0100.00817.10
7.1.60.0320.01035.18
7.1.50.0220.02034.72
7.1.40.0330.01634.36
7.1.30.0230.01034.34
7.1.20.0260.01034.40
7.1.10.0090.01116.43
7.1.00.0070.01316.36
7.0.200.0050.01416.77
7.0.190.0100.01116.42
7.0.180.0090.02016.18
7.0.170.0100.01016.19
7.0.160.0080.00916.20
7.0.150.0090.01016.23
7.0.140.0080.01216.48
7.0.130.0090.01216.55
7.0.120.0120.01016.59
7.0.110.0130.00716.37
7.0.100.0130.00316.31
7.0.90.0130.00716.28
7.0.80.0110.01016.43
7.0.70.0020.01516.45
7.0.60.0070.01016.06
7.0.50.0080.01316.51
7.0.40.0030.01316.60
7.0.30.0080.00816.39
7.0.20.0110.00516.54
7.0.10.0080.01316.45
7.0.00.0130.00816.42

preferences:
44.42 ms | 400 KiB | 5 Q