3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = <<<PHP return; class Foo { public function foo() { // throw notice about deprecated constructor } } PHP; set_error_handler(function($errno, $errstr) { throw new Exception($errstr, $errno); // convert error to exception }); try { eval($foo); } catch (Exception $e) { printf("error %d with message: %s\n", $e->getCode(), $e->getMessage()); } var_dump( class_exists('foo') // exists! );

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.70.0140.00716.63
8.3.60.0100.00616.49
8.3.50.0120.00721.28
8.3.40.0170.00318.58
8.3.30.0070.00718.84
8.3.20.0040.00420.16
8.3.10.0030.00620.66
8.3.00.0050.00320.52
8.2.180.0140.00418.39
8.2.170.0120.00322.96
8.2.160.0080.00620.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00319.36
8.2.120.0040.00426.35
8.2.110.0060.00322.27
8.2.100.0080.00417.70
8.2.90.0000.00818.17
8.2.80.0030.00517.97
8.2.70.0030.00517.25
8.2.60.0050.00517.43
8.2.50.0000.00818.09
8.2.40.0050.00220.42
8.2.30.0000.00721.18
8.2.20.0030.00617.63
8.2.10.0000.00718.01
8.2.00.0050.00218.00
8.1.280.0090.00925.92
8.1.270.0040.00423.92
8.1.260.0040.00428.09
8.1.250.0000.00928.09
8.1.240.0030.00623.83
8.1.230.0070.00420.95
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0080.00017.22
8.1.180.0050.00318.10
8.1.170.0050.00318.61
8.1.160.0040.00420.79
8.1.150.0040.00418.90
8.1.140.0030.00519.50
8.1.130.0030.00317.71
8.1.120.0050.00217.38
8.1.110.0040.00417.52
8.1.100.0040.00417.45
8.1.90.0040.00417.48
8.1.80.0000.00717.46
8.1.70.0040.00417.48
8.1.60.0070.00317.60
8.1.50.0000.00917.44
8.1.40.0040.00417.57
8.1.30.0140.00017.65
8.1.20.0040.00417.58
8.1.10.0050.00217.43
8.1.00.0000.00817.35
8.0.300.0000.00720.07
8.0.290.0000.00716.75
8.0.280.0000.00718.50
8.0.270.0040.00416.74
8.0.260.0030.00317.25
8.0.250.0030.00317.00
8.0.240.0040.00416.90
8.0.230.0030.00317.05
8.0.220.0030.00317.00
8.0.210.0000.00717.04
8.0.200.0060.00017.02
8.0.190.0000.01016.93
8.0.180.0000.00716.99
8.0.170.0030.00517.00
8.0.160.0030.00416.88
8.0.150.0040.00416.90
8.0.140.0000.00716.85
8.0.130.0000.00713.34
8.0.120.0040.00416.88
8.0.110.0000.00816.86
8.0.100.0000.00817.02
8.0.90.0000.00716.96
8.0.80.0060.00816.95
8.0.70.0000.00817.00
8.0.60.0000.00716.76
8.0.50.0070.00016.82
8.0.30.0140.00517.04
8.0.20.0100.00817.40
8.0.10.0070.00017.02
8.0.00.0090.01216.70
7.4.330.0050.00015.08
7.4.320.0000.00616.60
7.4.300.0060.00016.67
7.4.290.0040.00516.63
7.4.280.0050.00316.48
7.4.270.0030.00316.52
7.4.260.0070.00016.59
7.4.250.0030.00516.50
7.4.240.0030.00316.62
7.4.230.0040.00416.58
7.4.220.0150.00316.64
7.4.210.0040.01116.61
7.4.200.0040.00416.58
7.4.160.0100.00516.59
7.4.150.0090.01517.40
7.4.140.0120.00517.86
7.4.130.0080.01116.64
7.4.120.0050.01216.50
7.4.110.0060.01216.54
7.4.100.0120.01216.66
7.4.90.0070.01016.66
7.4.80.0090.01519.39
7.4.70.0070.01016.54
7.4.60.0060.01416.39
7.4.50.0090.00916.50
7.4.40.0090.00616.57
7.4.30.0090.00916.52
7.4.00.0090.00914.81
7.3.330.0060.00313.16
7.3.320.0030.00313.26
7.3.310.0040.00416.20
7.3.300.0030.00316.32
7.3.290.0130.00616.30
7.3.280.0100.00716.25
7.3.270.0130.01317.40
7.3.260.0140.00716.48
7.3.250.0060.01316.54
7.3.240.0140.00616.34
7.3.230.0100.00716.51
7.3.210.0060.00916.62
7.3.200.0070.01019.39
7.3.190.0090.00616.52
7.3.180.0120.00416.33
7.3.170.0110.00616.49
7.3.160.0140.00316.52
7.2.330.0070.01016.41
7.2.320.0090.00916.77
7.2.310.0090.00916.77
7.2.300.0130.00616.66
7.2.290.0100.00716.58
7.2.110.0160.00316.28
7.2.60.0060.00916.74
7.2.00.0040.00719.32
7.1.200.0000.00915.79
7.1.100.0100.00318.16
7.1.70.0000.01016.85
7.1.60.0090.01219.19
7.1.50.0000.02116.64
7.1.00.0030.07322.36
7.0.200.0030.00716.80
7.0.60.0100.07721.67
7.0.50.0100.03317.97
7.0.40.0130.05020.10
7.0.30.0300.08020.25
7.0.20.0300.07320.30
7.0.10.0100.08020.20
7.0.00.0100.08320.18
5.6.280.0000.07721.04
5.6.210.0100.07020.73
5.6.200.0030.06318.15
5.6.190.0030.04020.77
5.6.180.0030.05020.63
5.6.170.0270.08020.54
5.6.160.0100.07720.46
5.6.150.0030.05318.29
5.6.140.0030.08318.28
5.6.130.0100.06718.14
5.6.120.0100.08321.05
5.6.110.0070.04321.00
5.6.100.0100.08020.98
5.6.90.0070.08321.00
5.6.80.0000.04020.34
5.5.350.0100.04020.43
5.5.340.0000.04317.96
5.5.330.0030.08320.42
5.5.320.0730.05320.31
5.5.310.0370.08020.28
5.5.300.0070.07718.08
5.5.290.0030.04717.95
5.5.280.0130.08720.77
5.5.270.0100.08320.96
5.5.260.0070.06720.96
5.5.250.0170.08020.46
5.5.240.0270.06720.28

preferences:
69.12 ms | 401 KiB | 5 Q