3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = <<<PHP \$LOST_VARIABLE = 42; 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! isset($LOST_VARIABLE) // where is my variable );

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.0100.00716.75
8.3.60.0140.00018.26
8.3.50.0110.01321.18
8.3.40.0030.01218.75
8.3.30.0110.00418.81
8.3.20.0070.00020.34
8.3.10.0050.00320.60
8.3.00.0110.00020.52
8.2.180.0040.01116.32
8.2.170.0040.01122.96
8.2.160.0110.00320.28
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.36
8.2.120.0000.00726.35
8.2.110.0060.00320.44
8.2.100.0080.00317.97
8.2.90.0080.00019.17
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0000.00818.01
8.2.50.0040.00418.09
8.2.40.0040.00420.59
8.2.30.0070.00019.32
8.2.20.0060.00317.60
8.2.10.0000.00818.07
8.2.00.0040.00418.02
8.1.280.0110.00425.92
8.1.270.0040.00423.95
8.1.260.0110.00728.09
8.1.250.0080.00028.09
8.1.240.0040.00423.98
8.1.230.0100.00019.16
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0070.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0040.00420.87
8.1.150.0040.00418.82
8.1.140.0000.00819.49
8.1.130.0000.00717.72
8.1.120.0030.00417.39
8.1.110.0050.00317.45
8.1.100.0070.00017.38
8.1.90.0080.00017.46
8.1.80.0080.00017.38
8.1.70.0000.00717.43
8.1.60.0060.00617.62
8.1.50.0040.00417.48
8.1.40.0040.00417.54
8.1.30.0090.00017.70
8.1.20.0060.00317.71
8.1.10.0030.00517.50
8.1.00.0040.00417.42
8.0.300.0060.00318.77
8.0.290.0000.00716.63
8.0.280.0000.00718.50
8.0.270.0000.00717.27
8.0.260.0000.00617.11
8.0.250.0030.00517.06
8.0.240.0070.00017.04
8.0.230.0000.00817.02
8.0.220.0050.00216.98
8.0.210.0000.00716.94
8.0.200.0000.00916.98
8.0.190.0030.00517.07
8.0.180.0000.00717.00
8.0.170.0040.00416.88
8.0.160.0050.00316.86
8.0.150.0000.00716.92
8.0.140.0070.00016.86
8.0.130.0030.00313.34
8.0.120.0050.00316.80
8.0.110.0050.00516.84
8.0.100.0040.00416.89
8.0.90.0000.00716.78
8.0.80.0100.00616.88
8.0.70.0040.00416.88
8.0.60.0040.00416.82
8.0.50.0020.00516.94
8.0.30.0100.01017.14
8.0.20.0070.01117.40
8.0.10.0000.00717.08
8.0.00.0130.00616.84
7.4.330.0020.00215.08
7.4.320.0000.00616.55
7.4.300.0000.00616.52
7.4.290.0060.00316.50
7.4.280.0040.00416.49
7.4.270.0000.00716.59
7.4.260.0070.00016.59
7.4.250.0050.00316.55
7.4.240.0000.00716.61
7.4.230.0050.00316.62
7.4.220.0040.01416.70
7.4.210.0080.00716.48
7.4.200.0000.00716.35
7.4.160.0090.00616.55
7.4.150.0060.01217.40
7.4.140.0130.00617.86
7.4.130.0130.00716.51
7.4.120.0070.01016.54
7.4.110.0100.00716.47
7.4.100.0110.00816.57
7.4.90.0070.01416.45
7.4.80.0060.01219.39
7.4.70.0110.00516.59
7.4.60.0100.00616.44
7.4.50.0030.00916.42
7.4.40.0030.01316.68
7.4.30.0000.01816.53
7.4.00.0080.01014.99
7.3.330.0000.00613.12
7.3.320.0030.00213.20
7.3.310.0000.00716.29
7.3.300.0070.00016.25
7.3.290.0110.00516.26
7.3.280.0080.01216.27
7.3.270.0110.00517.40
7.3.260.0170.00716.27
7.3.250.0100.01016.46
7.3.240.0100.01116.39
7.3.230.0090.00916.59
7.3.210.0070.01016.39
7.3.200.0000.01619.39
7.3.190.0100.00616.52
7.3.180.0030.01216.42
7.3.170.0060.01516.36
7.3.160.0140.00316.34
7.3.120.0150.00014.59
7.3.110.0130.00715.07
7.3.100.0180.00014.92
7.3.90.0040.01114.71
7.3.80.0090.00914.86
7.3.70.0070.00814.90
7.3.60.0000.01414.88
7.3.50.0100.00314.82
7.3.40.0060.00314.86
7.3.30.0100.00014.68
7.3.20.0030.01716.71
7.3.10.0070.00816.67
7.3.00.0070.00816.65
7.2.330.0100.00616.39
7.2.320.0100.01416.42
7.2.310.0140.00616.60
7.2.300.0060.01516.50
7.2.290.0110.00516.32
7.2.250.0150.00315.22
7.2.240.0100.01015.21
7.2.230.0130.00315.00
7.2.220.0040.01115.05
7.2.210.0040.01415.20
7.2.200.0070.00715.07
7.2.190.0040.00415.13
7.2.180.0000.01314.97
7.2.170.0030.00614.81
7.2.160.0040.00415.04
7.2.150.0070.00716.97
7.2.140.0060.00916.79
7.2.130.0060.00616.82
7.2.120.0040.00716.84
7.2.110.0050.01017.01
7.2.100.0030.01316.91
7.2.90.0030.00916.91
7.2.80.0030.00816.70
7.2.70.0040.00716.84
7.2.60.0050.00816.87
7.2.50.0060.00816.91
7.2.40.0070.00516.86
7.2.30.0020.01217.00
7.2.20.0090.00316.87
7.2.10.0090.00416.87
7.2.00.0090.00517.71
7.1.330.0060.01015.84
7.1.320.0000.01715.47
7.1.310.0030.01015.57
7.1.300.0060.00615.73
7.1.290.0100.00315.68
7.1.280.0080.00315.82
7.1.270.0030.01015.89
7.1.260.0100.01015.70
7.1.250.0040.00815.77
7.1.240.0040.01215.57
7.1.230.0030.00915.80
7.1.220.0090.00615.56
7.1.210.0060.00715.73
7.1.200.0070.00715.61
7.1.190.0040.00415.89
7.1.180.0040.00815.47
7.1.170.0040.00415.43
7.1.160.0030.01015.86
7.1.150.0120.00315.73
7.1.140.0030.01015.73
7.1.130.0030.00815.68
7.1.120.0050.00815.62
7.1.110.0060.00315.84
7.1.100.0040.00916.88
7.1.90.0080.00615.75
7.1.80.0030.01215.49
7.1.70.0040.00516.41
7.1.60.0090.01117.31
7.1.50.0010.01616.35
7.1.40.0070.01015.68
7.1.30.0070.00715.81
7.1.20.0000.01215.44
7.1.10.0060.00615.38
7.1.00.0100.03518.98
7.0.330.0060.00615.36
7.0.320.0060.01015.34
7.0.310.0000.01715.40
7.0.300.0000.01315.18
7.0.290.0030.00715.38
7.0.280.0030.01015.13
7.0.270.0070.00715.13
7.0.260.0000.01515.54
7.0.250.0040.00715.17
7.0.240.0000.01115.43
7.0.230.0040.00415.61
7.0.220.0000.01315.51
7.0.210.0030.00715.42
7.0.200.0000.00816.21
7.0.190.0000.01615.37
7.0.180.0100.00315.46
7.0.170.0080.00315.30
7.0.160.0000.01015.30
7.0.150.0000.01215.18
7.0.140.0000.00915.48
7.0.130.0040.00815.26
7.0.120.0120.00315.40
7.0.110.0000.00915.27
7.0.100.0070.00714.99
7.0.90.0090.00015.52
7.0.80.0140.00415.43
7.0.70.0030.01215.40
7.0.60.0040.03818.64
7.0.50.0090.03616.72
7.0.40.0080.04616.85
7.0.30.0170.04416.79
7.0.20.0200.03916.72
7.0.10.0070.04716.68
7.0.00.0090.02616.83
5.6.400.0030.00914.67
5.6.390.0100.00314.32
5.6.380.0030.01314.65
5.6.370.0000.00814.02
5.6.360.0070.00714.20
5.6.350.0040.00714.20
5.6.340.0030.00914.55
5.6.330.0030.00614.49
5.6.320.0040.00814.63
5.6.310.0090.00314.40
5.6.300.0000.01314.14
5.6.290.0070.00714.26
5.6.280.0050.04117.62
5.6.270.0070.00414.34
5.6.260.0030.00514.13
5.6.250.0060.00614.30
5.6.240.0000.01014.28
5.6.230.0030.00614.37
5.6.220.0060.01014.48
5.6.210.0070.04017.44
5.6.200.0060.02616.31
5.6.190.0020.05117.42
5.6.180.0160.02617.42
5.6.170.0180.03517.36
5.6.160.0000.03317.37
5.6.150.0050.04616.27
5.6.140.0030.02416.30
5.6.130.0100.03816.30
5.6.120.0020.02817.73
5.6.110.0080.03817.66
5.6.100.0070.04217.59
5.6.90.0060.02617.78
5.6.80.0120.02617.24
5.6.70.0100.00314.49
5.6.60.0030.00613.96
5.6.50.0130.00314.20
5.6.40.0070.00714.14
5.6.30.0000.00813.95
5.6.20.0060.00913.93
5.6.10.0000.01314.18
5.6.00.0030.00714.44
5.5.380.0070.01114.07
5.5.370.0090.00014.10
5.5.360.0070.00714.34
5.5.350.0100.04117.19
5.5.340.0090.02815.98
5.5.330.0130.03817.19
5.5.320.0120.03017.13
5.5.310.0210.03117.05
5.5.300.0050.04316.14
5.5.290.0050.02816.04
5.5.280.0080.04017.39
5.5.270.0050.03717.58
5.5.260.0030.05017.39
5.5.250.0100.03817.38
5.5.240.0140.04017.22
5.5.230.0040.00413.91
5.5.220.0060.00314.04
5.5.210.0060.00614.07
5.5.200.0090.00314.02
5.5.190.0040.00414.08
5.5.180.0100.00314.20
5.5.170.0100.00314.00
5.5.160.0060.00313.95
5.5.150.0000.01414.09
5.5.140.0040.00714.35
5.5.130.0040.00414.09
5.5.120.0090.00313.91
5.5.110.0070.00714.03
5.5.100.0040.00413.86
5.5.90.0070.00314.05
5.5.80.0100.00614.18
5.5.70.0030.00914.21
5.5.60.0000.01414.27
5.5.50.0030.01214.10
5.5.40.0060.00613.77
5.5.30.0000.01113.78
5.5.20.0000.01213.92
5.5.10.0000.01314.32
5.5.00.0070.00714.25

preferences:
42.91 ms | 401 KiB | 5 Q