3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ const CON = 'CON_FOO'; static private $instance; public static function getInstance() { if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c; } return self::$instance; } function show() { echo static::CON; } } class FooChild extends Foo{ const CON = 'CON_FOOCHILD'; static private $instance; public static function getInstance() { if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c; } return self::$instance; } } $inst = FooChild::getInstance(); echo $inst::CON; $inst->show();

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.0070.01016.58
8.3.60.0140.00318.68
8.3.50.0090.01321.26
8.3.40.0150.00018.57
8.3.30.0140.00418.60
8.3.20.0050.00318.95
8.3.10.0070.00021.22
8.3.00.0040.00419.92
8.2.180.0070.01116.50
8.2.170.0110.00422.96
8.2.160.0030.01220.52
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.11
8.2.110.0060.00320.53
8.2.100.0060.00617.78
8.2.90.0040.00419.00
8.2.80.0000.00719.25
8.2.70.0040.00417.50
8.2.60.0050.00318.00
8.2.50.0060.00318.07
8.2.40.0060.00318.16
8.2.30.0000.00821.28
8.2.20.0030.00517.52
8.2.10.0040.00417.74
8.2.00.0030.00617.72
8.1.280.0070.00725.92
8.1.270.0030.00523.99
8.1.260.0100.00726.35
8.1.250.0050.00328.09
8.1.240.0030.00622.48
8.1.230.0000.01120.97
8.1.220.0040.00418.77
8.1.210.0000.00818.84
8.1.200.0000.01117.35
8.1.190.0070.00017.53
8.1.180.0040.00418.10
8.1.170.0060.00318.39
8.1.160.0000.00718.93
8.1.150.0040.00418.63
8.1.140.0000.00717.42
8.1.130.0030.00317.78
8.1.120.0020.00517.48
8.1.110.0060.00317.45
8.1.100.0070.00017.44
8.1.90.0050.00317.51
8.1.80.0000.00817.45
8.1.70.0030.00317.44
8.1.60.0000.00917.54
8.1.50.0030.00517.39
8.1.40.0040.00417.41
8.1.30.0000.00817.48
8.1.20.0040.00417.55
8.1.10.0040.00417.42
8.1.00.0040.00417.47
8.0.300.0020.00519.93
8.0.290.0000.00817.15
8.0.280.0030.00318.48
8.0.270.0000.00717.25
8.0.260.0000.00816.80
8.0.250.0000.00716.94
8.0.240.0000.00816.80
8.0.230.0030.00516.93
8.0.220.0000.00716.77
8.0.210.0000.00716.79
8.0.200.0080.00316.95
8.0.190.0080.00016.95
8.0.180.0000.00816.80
8.0.170.0000.00816.88
8.0.160.0040.00416.89
8.0.150.0040.00416.86
8.0.140.0070.00016.82
8.0.130.0050.00013.38
8.0.120.0000.00816.68
8.0.110.0030.00516.86
8.0.100.0030.00616.87
8.0.90.0040.00416.72
8.0.80.0080.00816.89
8.0.70.0050.00216.93
8.0.60.0040.00416.76
8.0.50.0060.00316.89
8.0.30.0110.01317.08
8.0.20.0090.01017.40
8.0.10.0050.00216.96
8.0.00.0080.01216.78
7.4.330.0000.00516.71
7.4.320.0060.00016.56
7.4.300.0060.00016.41
7.4.290.0040.00416.51
7.4.280.0000.00716.50
7.4.270.0060.00016.56
7.4.260.0030.00313.29
7.4.250.0080.00016.52
7.4.240.0070.00016.50
7.4.230.0040.00416.67
7.4.220.0060.01016.58
7.4.210.0080.00716.58
7.4.200.0030.00316.58
7.4.190.0070.00016.46
7.4.160.0090.00616.38
7.4.150.0110.01417.40
7.4.140.0080.01317.86
7.4.130.0070.01016.54
7.4.120.0100.00716.40
7.4.110.0060.01616.39
7.4.100.0040.01416.67
7.4.90.0080.01616.58
7.4.80.0150.00319.39
7.4.70.0100.00616.43
7.4.60.0070.01016.56
7.4.50.0000.00816.56
7.4.40.0000.01522.77
7.4.30.0060.01816.48
7.4.00.0050.01414.92
7.3.330.0000.00613.36
7.3.320.0050.00313.36
7.3.310.0040.00416.38
7.3.300.0030.00316.27
7.3.290.0000.01416.38
7.3.280.0130.00716.36
7.3.270.0100.00717.40
7.3.260.0140.00818.24
7.3.250.0100.00716.30
7.3.240.0100.00716.39
7.3.230.0120.00316.39
7.3.210.0100.00716.61
7.3.200.0070.01319.39
7.3.190.0100.00716.65
7.3.180.0080.00816.57
7.3.170.0100.00716.27
7.3.160.0090.00616.56
7.3.120.0130.00514.85
7.3.110.0070.01114.68
7.3.100.0030.01214.88
7.3.90.0070.00714.68
7.3.80.0060.00914.86
7.3.70.0060.00614.86
7.3.60.0070.00714.82
7.3.50.0000.01714.54
7.3.40.0100.00714.68
7.3.30.0060.01014.63
7.3.20.0000.01016.69
7.3.10.0060.00916.73
7.3.00.0080.00616.72
7.2.330.0150.00916.38
7.2.320.0030.01716.33
7.2.310.0070.01116.65
7.2.300.0160.00616.49
7.2.290.0060.01016.83
7.2.250.0070.01414.57
7.2.240.0040.01814.95
7.2.230.0060.01314.73
7.2.220.0070.01114.98
7.2.210.0070.00715.29
7.2.200.0040.00715.18
7.2.190.0060.00615.04
7.2.180.0000.01515.16
7.2.170.0030.01315.00
7.2.00.0000.01319.25
7.1.330.0040.00815.59
7.1.320.0090.00615.65
7.1.310.0080.00815.75
7.1.300.0040.00815.71
7.1.290.0060.00915.79
7.1.280.0070.00415.64
7.1.270.0040.00815.53
7.1.260.0040.01115.65
7.1.100.0060.00618.06
7.1.70.0040.00417.06
7.1.60.0060.00616.98
7.1.50.0040.00717.01
7.1.40.0030.01316.90
7.1.30.0030.00916.90
7.1.20.0100.01316.90
7.1.10.0020.00516.90
7.1.00.0030.00616.90
7.0.200.0030.00716.90
7.0.190.0040.01216.90
7.0.180.0060.00916.90
7.0.170.0000.01516.90
7.0.160.0000.01116.90
7.0.150.0000.00716.90
7.0.140.0080.00016.90
7.0.130.0030.00616.90
7.0.120.0000.00816.90
7.0.110.0030.01316.90
7.0.100.0000.01416.90
7.0.90.0070.01316.90
7.0.80.0070.00716.90
7.0.70.0000.00816.90
7.0.60.0000.00916.90
7.0.50.0050.00516.90
7.0.40.0040.01116.90
7.0.30.0050.00316.90
7.0.20.0000.01016.90
7.0.10.0000.01116.90
7.0.00.0030.01216.90
5.6.300.0070.06720.88
5.6.290.0160.02820.91
5.6.280.0000.04421.08
5.6.270.0030.08620.87
5.6.260.0000.08620.90
5.6.250.0000.07020.97
5.6.240.0100.03520.83
5.6.230.0030.06320.90
5.6.220.0060.03920.95
5.6.210.0070.06420.98
5.6.200.0030.04520.87
5.6.190.0030.04121.00
5.6.180.0070.04320.96
5.6.170.0070.08220.83
5.6.160.0030.06120.87
5.6.150.0070.05920.74
5.6.140.0100.04220.84
5.6.130.0030.04820.87
5.6.120.0030.04120.93
5.6.110.0100.03520.77
5.6.100.0100.03820.76
5.6.90.0070.04620.85
5.6.80.0000.08920.42
5.6.70.0070.03720.21
5.6.60.0160.06420.15
5.6.50.0000.04220.37
5.6.40.0000.04820.18
5.6.30.0060.05820.39
5.6.20.0030.04120.27
5.6.10.0040.04420.16
5.6.00.0070.04320.16
5.5.380.0000.04917.55
5.5.370.0040.03917.48
5.5.360.0000.04317.64
5.5.350.0000.04317.61
5.5.340.0000.04318.10
5.5.330.0000.04318.09
5.5.320.0030.04017.77
5.5.310.0070.03817.83
5.5.300.0000.04518.06
5.5.290.0000.06518.06
5.5.280.0030.04117.74
5.5.270.0070.03718.01
5.5.260.0030.06817.83
5.5.250.0030.04217.69
5.5.240.0070.03617.25
5.5.230.0000.07717.46
5.5.220.0030.05817.37
5.5.210.0070.03417.41
5.5.200.0070.03417.41
5.5.190.0040.03917.37
5.5.180.0000.07917.45
5.5.160.0000.04017.44
5.5.150.0060.03917.44
5.5.140.0070.03317.38
5.5.130.0000.04317.39
5.5.120.0030.03817.21
5.5.110.0030.04117.52
5.5.100.0030.03817.34
5.5.90.0030.04617.34
5.5.80.0000.05417.11
5.5.70.0030.03817.29
5.5.60.0030.03616.99
5.5.50.0000.03917.38
5.5.40.0030.03717.08
5.5.30.0060.03217.28
5.5.20.0000.04217.35
5.5.10.0070.04117.07
5.5.00.0070.05617.27
5.4.450.0000.04419.47
5.4.440.0030.04619.48
5.4.430.0000.04519.30
5.4.420.0030.05219.20
5.4.410.0030.05919.43
5.4.400.0070.03619.07
5.4.390.0070.03619.20
5.4.380.0030.04719.08
5.4.370.0070.03318.91
5.4.360.0030.06019.07
5.4.350.0060.03519.21
5.4.340.0100.07319.16
5.4.320.0030.04118.89
5.4.310.0000.04518.98
5.4.300.0030.03719.23
5.4.290.0000.04118.97
5.4.280.0030.03919.10
5.4.270.0070.05118.95
5.4.260.0070.03418.97
5.4.250.0000.04219.10
5.4.240.0030.04219.08
5.4.230.0070.03919.12
5.4.220.0030.03918.97
5.4.210.0000.05218.87
5.4.200.0000.04019.07
5.4.190.0000.04219.22
5.4.180.0030.03819.05
5.4.170.0040.04719.22
5.4.160.0030.04119.04
5.4.150.0070.07118.89
5.4.140.0100.03316.90
5.4.130.0030.03516.90
5.4.120.0070.03316.90
5.4.110.0000.04216.90
5.4.100.0090.03116.90
5.4.90.0060.03216.90
5.4.80.0070.03516.90
5.4.70.0070.03616.90
5.4.60.0070.03716.90
5.4.50.0000.03916.90
5.4.40.0000.04016.90
5.4.30.0100.03016.90
5.4.20.0000.03716.90
5.4.10.0060.03416.90
5.4.00.0030.03416.90
5.3.290.0000.04016.90
5.3.280.0000.04116.90
5.3.270.0070.05916.90
5.3.260.0040.04016.90
5.3.250.0070.03616.90
5.3.240.0030.03816.90
5.3.230.0030.03516.90
5.3.220.0030.03516.90
5.3.210.0030.04016.90
5.3.200.0100.03216.90
5.3.190.0030.04016.90
5.3.180.0060.03716.90
5.3.170.0030.03716.90
5.3.160.0000.04416.90
5.3.150.0000.04716.90
5.3.140.0030.03716.90
5.3.130.0070.03516.90
5.3.120.0060.03416.90
5.3.110.0000.04316.90
5.3.100.0070.03116.90
5.3.90.0000.05316.90
5.3.80.0000.04416.90
5.3.70.0030.03816.90
5.3.60.0060.04516.90
5.3.50.0070.03116.90
5.3.40.0120.04916.90
5.3.30.0030.04116.90
5.3.20.0030.03416.90
5.3.10.0030.03416.90
5.3.00.0060.03516.90
5.2.170.0000.05616.90
5.2.160.0000.03116.90
5.2.150.0000.03416.90
5.2.140.0030.02916.90
5.2.130.0070.02416.90
5.2.120.0070.02816.90
5.2.110.0030.02716.90
5.2.100.0030.03016.90
5.2.90.0070.03716.90
5.2.80.0000.06116.90
5.2.70.0000.05416.90
5.2.60.0030.03416.90
5.2.50.0040.02816.90
5.2.40.0030.02716.90
5.2.30.0070.02516.90
5.2.20.0000.04016.90
5.2.10.0030.03216.90
5.2.00.0070.04316.90
5.1.60.0070.03516.90
5.1.50.0060.04716.90
5.1.40.0060.02216.90
5.1.30.0200.01716.90
5.1.20.0090.02216.90
5.1.10.0000.03216.90
5.1.00.0000.03316.90
5.0.50.0000.04816.90
5.0.40.0030.02216.90
5.0.30.0060.02816.90
5.0.20.0040.01816.90
5.0.10.0080.01616.90
5.0.00.0000.03316.90
4.4.90.0090.02616.90
4.4.80.0000.01716.90
4.4.70.0030.01416.90
4.4.60.0030.01516.90
4.4.50.0080.01116.90
4.4.40.0060.04316.90
4.4.30.0000.03016.90
4.4.20.0060.01216.90
4.4.10.0060.01316.90
4.4.00.0000.02616.90
4.3.110.0030.01516.90
4.3.100.0000.01716.90
4.3.90.0000.01916.90
4.3.80.0000.03016.90
4.3.70.0030.01316.90
4.3.60.0030.01416.90
4.3.50.0000.01916.90
4.3.40.0070.02016.90
4.3.30.0000.02016.90
4.3.20.0000.03316.90
4.3.10.0000.02316.90
4.3.00.0030.02016.90

preferences:
58.52 ms | 401 KiB | 5 Q