3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register( function($classname) { $obj = new class { const SOME_CONST = 'foo'; // stuff... }; class_alias(get_class($obj), $classname, false); return $obj; } ); $obj = new Foo; var_dump($obj); echo Foo::SOME_CONST;

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.0150.00618.43
8.3.50.0150.00621.99
8.3.40.0150.00018.66
8.3.30.0040.01118.84
8.3.20.0040.00420.86
8.3.10.0050.00321.73
8.3.00.0080.00019.79
8.2.180.0070.00718.50
8.2.170.0180.00322.96
8.2.160.0140.00320.58
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0050.00321.06
8.2.120.0080.00026.35
8.2.110.0060.00321.18
8.2.100.0000.01117.86
8.2.90.0080.00017.91
8.2.80.0030.00619.75
8.2.70.0090.00018.03
8.2.60.0030.00718.22
8.2.50.0040.00418.10
8.2.40.0040.00420.32
8.2.30.0000.00719.34
8.2.20.0000.00718.05
8.2.10.0000.00817.93
8.2.00.0000.00717.68
8.1.280.0090.00925.92
8.1.270.0060.00321.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0090.00023.92
8.1.230.0120.00322.75
8.1.220.0030.00617.74
8.1.210.0000.00819.04
8.1.200.0000.00917.23
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0080.00018.84
8.1.160.0000.00718.90
8.1.150.0000.00720.28
8.1.140.0000.00717.48
8.1.130.0060.00319.06
8.1.120.0000.00717.48
8.1.110.0050.00317.45
8.1.100.0030.00617.35
8.1.90.0040.00417.35
8.1.80.0000.00717.46
8.1.70.0030.00317.49
8.1.60.0050.00317.55
8.1.50.0000.00717.42
8.1.40.0000.00817.54
8.1.30.0040.00417.49
8.1.20.0040.00417.55
8.1.10.0020.00517.65
8.1.00.0040.00417.58
8.0.300.0000.00819.70
8.0.290.0090.00016.75
8.0.280.0040.00418.45
8.0.270.0070.00016.73
8.0.260.0000.00716.79
8.0.250.0000.00716.94
8.0.240.0040.00416.98
8.0.230.0070.00017.00
8.0.220.0030.00316.75
8.0.210.0000.00716.90
8.0.200.0060.00016.99
8.0.190.0080.00016.83
8.0.180.0040.00416.80
8.0.170.0020.00516.91
8.0.160.0000.00716.95
8.0.150.0040.00416.90
8.0.140.0050.00216.71
8.0.130.0050.00013.30
8.0.120.0040.00416.89
8.0.110.0040.00416.85
8.0.100.0040.00416.77
8.0.90.0000.00716.94
8.0.80.0140.00716.89
8.0.70.0000.00716.72
8.0.60.0000.00716.86
8.0.50.0000.00816.76
8.0.30.0090.00817.07
8.0.20.0130.00917.40
8.0.10.0050.00317.02
8.0.00.0100.00716.71
7.4.330.0000.00715.55
7.4.320.0000.00616.61
7.4.300.0060.00016.51
7.4.290.0030.00316.55
7.4.280.0040.00416.51
7.4.270.0070.00016.57
7.4.260.0040.00416.55
7.4.250.0030.00316.49
7.4.240.0050.00316.67
7.4.230.0040.00416.70
7.4.220.0070.01116.64
7.4.210.0030.01616.54
7.4.200.0000.00816.58
7.4.160.0100.00516.55
7.4.150.0090.00917.40
7.4.140.0100.00717.86
7.4.130.0080.01316.41
7.4.120.0130.00916.48
7.4.110.0090.01216.56
7.4.100.0120.00616.63
7.4.90.0070.01416.48
7.4.80.0060.01519.39
7.4.70.0110.01116.65
7.4.60.0030.01216.53
7.4.50.0130.00316.42
7.4.40.0000.01716.60
7.4.30.0130.00416.71
7.4.10.0040.01514.98
7.4.00.0080.00915.08
7.3.330.0000.00613.25
7.3.320.0000.00513.27
7.3.310.0040.00416.11
7.3.300.0030.00316.34
7.3.290.0080.00516.32
7.3.280.0060.01316.29
7.3.270.0090.00917.40
7.3.260.0110.00716.49
7.3.250.0120.00616.43
7.3.240.0080.01016.42
7.3.230.0130.00416.68
7.3.210.0060.01016.52
7.3.200.0130.00316.38
7.3.190.0070.01016.41
7.3.180.0060.01216.51
7.3.170.0030.01316.58
7.3.160.0070.01416.52
7.3.130.0090.00914.98
7.3.120.0080.00914.80
7.3.110.0100.00814.90
7.3.100.0090.00814.85
7.3.90.0050.00914.88
7.3.80.0080.00514.71
7.3.70.0020.00914.75
7.3.60.0030.01214.84
7.3.50.0070.00614.69
7.3.40.0040.00814.80
7.3.30.0070.00514.83
7.3.20.0050.00816.66
7.3.10.0070.00616.67
7.3.00.0090.00616.67
7.2.330.0090.01516.64
7.2.320.0030.01316.72
7.2.310.0070.01016.75
7.2.300.0120.00616.46
7.2.290.0000.01816.61
7.2.260.0070.01015.33
7.2.250.0060.01115.03
7.2.240.0060.01014.96
7.2.230.0090.00614.93
7.2.220.0060.00915.19
7.2.210.0050.00814.93
7.2.200.0050.00814.91
7.2.190.0060.00814.92
7.2.180.0050.00714.99
7.2.170.0080.00214.94
7.2.160.0070.00515.00
7.2.150.0090.00416.90
7.2.140.0020.01017.02
7.2.130.0060.00716.79
7.2.120.0050.00816.88
7.2.110.0050.00717.06
7.2.100.0100.00416.80
7.2.90.0060.01117.01
7.2.80.0040.00916.98
7.2.70.0030.01016.94
7.2.60.0070.00616.86
7.2.50.0010.01116.81
7.2.40.0090.00817.04
7.2.30.0060.00916.90
7.2.20.0090.00416.95
7.2.10.0080.00716.86
7.2.00.0040.01017.48
7.1.330.0050.01115.70
7.1.320.0050.00815.58
7.1.310.0050.01115.56
7.1.300.0040.01015.75
7.1.290.0050.00915.75
7.1.280.0040.00715.49
7.1.270.0060.00915.66
7.1.260.0010.01115.61
7.1.250.0060.00715.65
7.1.240.0080.00615.77
7.1.230.0020.01315.61
7.1.220.0010.01015.63
7.1.210.0040.00915.63
7.1.200.0050.00515.63
7.1.190.0060.00615.49
7.1.180.0080.00615.79
7.1.170.0060.00815.61
7.1.160.0100.00715.75
7.1.150.0020.00815.72
7.1.140.0050.00815.80
7.1.130.0090.00715.72
7.1.120.0050.00615.71
7.1.110.0040.00615.70
7.1.100.0060.00616.51
7.1.90.0040.00915.62
7.1.80.0070.00715.51
7.1.70.0040.00716.27
7.1.60.0060.00716.15
7.1.50.0090.00816.21
7.1.40.0060.00615.79
7.1.30.0070.00715.62
7.1.20.0020.01115.71
7.1.10.0040.00815.72
7.1.00.0240.03117.42
7.0.330.0090.00315.21
7.0.320.0080.00515.33
7.0.310.0070.00515.28
7.0.300.0050.00715.10
7.0.290.0050.00815.31
7.0.280.0050.00615.22
7.0.270.0060.00515.42
7.0.260.0070.00415.13
7.0.250.0060.00615.46
7.0.240.0060.00515.25
7.0.230.0080.00515.44
7.0.220.0050.00515.28
7.0.210.0060.00315.20
7.0.200.0040.00815.63
7.0.190.0050.00715.42
7.0.180.0050.00515.33
7.0.170.0050.00815.27
7.0.160.0050.00715.30
7.0.150.0030.00815.22
7.0.140.0270.02816.98
7.0.130.0280.02017.10
7.0.120.0310.02616.94
7.0.110.0270.02316.94
7.0.100.0240.02517.10
7.0.90.0240.03017.04
7.0.80.0340.02817.05
7.0.70.0240.02517.04
7.0.60.0250.02316.91
7.0.50.0300.02117.09
7.0.40.0240.02415.76
7.0.30.0270.03015.65
7.0.20.0310.02415.74
7.0.10.0280.02315.79
7.0.00.0300.02515.67
5.6.400.0060.00614.38
5.6.390.0030.01014.34
5.6.380.0060.00514.08
5.6.370.0070.00914.20
5.6.360.0090.00614.11
5.6.350.0050.00714.09
5.6.340.0060.00714.08
5.6.330.0030.00814.42
5.6.320.0030.00914.31
5.6.310.0070.00514.20
5.6.300.0030.01014.21
5.6.290.0090.02416.41
5.6.280.0080.02316.50
5.6.270.0090.02016.43
5.6.260.0100.03116.44
5.6.250.0060.02616.47
5.6.240.0010.03116.47
5.6.230.0100.02416.33
5.6.220.0120.01916.42
5.6.210.0120.02716.44
5.6.200.0030.02816.35
5.6.190.0080.02616.39
5.6.180.0090.02216.30
5.6.170.0090.02316.31
5.6.160.0060.02616.34
5.6.150.0050.03016.30
5.6.140.0080.02216.42
5.6.130.0060.02316.37
5.6.120.0030.03016.28
5.6.110.0090.02416.35
5.6.100.0100.02216.38
5.6.90.0070.02316.39
5.6.80.0090.02216.12
5.6.70.0060.02416.21
5.6.60.0100.02216.16
5.6.50.0080.02116.20
5.6.40.0050.02516.15
5.6.30.0080.02116.20
5.6.20.0110.01715.98
5.6.10.0080.02116.08
5.6.00.0070.02216.10

preferences:
60.97 ms | 401 KiB | 5 Q