3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function ($class) { if ('Foo' === $class) { class Foo implements Foointerface {} } elseif ('Foointerface' === $class) { throw new Exception(); } }); try { // First call triggers the autoloader new Foo(); } catch (Exception $e) {} // For the second call Foo is loaded var_dump(new Foo()); // Even though it’s missing the interface var_dump(new Foo() instanceof Foointerface); var_dump((new ReflectionClass('Foo'))->getInterfaces());

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.0040.01518.27
8.3.50.0100.01018.04
8.3.40.0070.00718.79
8.3.30.0060.00918.70
8.3.20.0080.00018.77
8.3.10.0070.00021.64
8.3.00.0070.00021.68
8.2.180.0110.00425.92
8.2.170.0120.00318.95
8.2.160.0070.01022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0040.00419.95
8.2.110.0090.00019.31
8.2.100.0060.00917.72
8.2.90.0000.00917.97
8.2.80.0000.01217.97
8.2.70.0030.00517.63
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0000.00918.23
8.2.30.0040.00718.00
8.2.20.0000.00818.11
8.2.10.0040.00417.97
8.2.00.0030.00618.00
8.1.280.0100.01025.92
8.1.270.0100.00020.27
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0100.00722.11
8.1.230.0060.00622.75
8.1.220.0040.00417.74
8.1.210.0050.00318.92
8.1.200.0030.00617.22
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0040.00418.70
8.1.160.0040.00418.84
8.1.150.0000.00818.94
8.1.140.0020.00518.99
8.1.130.0040.00420.31
8.1.120.0000.00717.44
8.1.110.0050.00217.47
8.1.100.0040.00417.45
8.1.90.0000.00817.45
8.1.80.0030.00517.43
8.1.70.0040.00417.46
8.1.60.0070.00317.59
8.1.50.0020.00517.41
8.1.40.0030.00617.47
8.1.30.0040.00417.61
8.1.20.0040.00417.60
8.1.10.0000.00717.51
8.1.00.0000.00917.51
8.0.300.0050.00220.03
8.0.290.0040.00416.88
8.0.280.0030.00318.30
8.0.270.0000.00816.94
8.0.260.0000.00720.25
8.0.250.0070.00017.00
8.0.240.0020.00516.90
8.0.230.0040.00416.91
8.0.220.0060.00316.91
8.0.210.0030.00416.84
8.0.200.0000.00917.00
8.0.190.0000.00716.98
8.0.180.0000.00817.00
8.0.170.0030.00716.85
8.0.160.0000.00816.95
8.0.150.0080.00316.92
8.0.140.0040.00416.79
8.0.130.0060.00013.39
8.0.120.0000.00816.83
8.0.110.0080.00016.93
8.0.100.0040.00416.76
8.0.90.0000.00716.97
8.0.80.0140.00616.93
8.0.70.0030.00516.72
8.0.60.0040.00416.91
8.0.50.0040.00416.94
8.0.30.0120.00916.90
8.0.20.0070.01117.40
8.0.10.0070.00016.91
8.0.00.0080.01316.87
7.4.330.0000.00515.55
7.4.320.0000.00716.61
7.4.300.0060.00016.56
7.4.290.0050.00316.60
7.4.280.0030.00616.64
7.4.270.0070.00016.53
7.4.260.0050.00316.56
7.4.250.0000.00716.41
7.4.240.0040.00416.51
7.4.230.0080.00016.39
7.4.220.0000.00816.67
7.4.210.0060.00816.50
7.4.200.0070.00016.44
7.4.160.0020.01616.52
7.4.140.0100.00717.86
7.4.130.0040.01416.58
7.4.120.0110.00616.53
7.4.110.0080.00816.66
7.4.100.0130.00316.56
7.4.90.0090.00916.59
7.4.80.0100.01019.39
7.4.70.0180.00516.55
7.4.60.0090.00616.45
7.4.50.0100.00616.52
7.4.40.0120.00416.46
7.4.10.0030.01614.77
7.4.00.0080.01114.80
7.3.330.0070.00013.32
7.3.320.0050.00013.43
7.3.310.0030.00316.38
7.3.300.0070.00016.43
7.3.290.0070.01016.27
7.3.280.0100.00916.35
7.3.260.0110.01116.45
7.3.240.0080.01016.50
7.3.230.0100.00716.33
7.3.210.0060.01216.57
7.3.200.0100.00716.72
7.3.190.0060.00916.33
7.3.180.0120.00616.47
7.3.170.0150.00316.34
7.3.160.0100.00716.19
7.3.130.0070.01014.68
7.3.120.0080.00814.73
7.3.110.0050.01314.96
7.3.100.0050.00914.57
7.3.90.0060.00514.81
7.3.80.0050.00714.85
7.3.70.0060.00814.70
7.3.60.0050.01014.79
7.3.50.0060.00814.69
7.3.40.0060.00914.67
7.3.30.0110.00714.71
7.3.20.0100.00815.74
7.3.10.0120.00515.70
7.3.00.0130.00815.80
7.2.330.0160.00316.73
7.2.320.0170.00316.70
7.2.310.0070.01116.78
7.2.300.0080.01216.36
7.2.290.0090.00616.81
7.2.260.0150.00415.04
7.2.250.0050.01215.15
7.2.240.0070.01114.91
7.2.230.0020.00914.99
7.2.220.0070.00815.10
7.2.210.0010.01114.88
7.2.200.0080.00614.99
7.2.190.0080.01015.02
7.2.180.0060.00915.01
7.2.170.0050.00814.92
7.2.160.0080.00614.96
7.2.150.0100.00615.99
7.2.140.0100.00815.93
7.2.130.0220.00815.88
7.2.120.0110.00915.87
7.2.110.0110.00815.85
7.2.100.0720.00815.37
7.2.90.0780.00815.42
7.2.80.0810.00815.43
7.2.70.0890.00815.55
7.2.60.0960.00815.44
7.2.50.0960.00715.49
7.2.40.0890.00915.50
7.2.30.0940.00815.56
7.2.20.0880.00915.47
7.2.10.0950.00915.47
7.2.00.0770.00915.47
7.1.330.0050.00915.68
7.1.320.0060.00615.60
7.1.310.0080.00315.62
7.1.300.0090.00814.89
7.1.290.0090.00614.83
7.1.280.0080.00714.82
7.1.270.0110.00714.80
7.1.260.0100.00914.82
7.1.250.0100.00614.79
7.1.240.0160.00814.59
7.1.230.0140.00714.69
7.1.220.0820.00714.42
7.1.210.0890.00714.41
7.1.200.0810.00714.39
7.1.190.0990.00814.25
7.1.180.0920.00714.30
7.1.170.0860.00714.36
7.1.160.0770.00914.30
7.1.150.0900.00714.29
7.1.140.0960.00814.27
7.1.130.0930.00814.28
7.1.120.0750.00714.33
7.1.110.0690.00614.37
7.1.100.0710.00814.37
7.1.90.0720.00714.31
7.1.80.0760.00914.33
7.1.70.0850.00614.25
7.1.60.0950.00926.72
7.1.50.0740.01026.78
7.1.40.0860.00926.71
7.1.30.0900.01026.68
7.1.20.0900.00926.70
7.1.10.0760.00714.26
7.1.00.0800.00514.19
7.0.330.0310.00814.00
5.6.400.0150.01114.29
5.6.390.0170.01014.27
5.6.380.0090.00814.22

preferences:
54.99 ms | 400 KiB | 5 Q