3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container implements \ArrayAccess { protected $values; public function __construct (array $values = array()) { $this->values = $values; } /* ... */ } class ServiceContainer extends Container { protected static $instance; protected $storage; protected function __construct($storage) { $this->storage = $storage; } public static function init(ServiceStorageInterface $storage) { return static::$instance = new static($storage); } public static function getInstance() { if ( ! isset(static::$instance)) { throw new Exception('ServiceContainer is not initialized'); } return static::$instance; } }

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.0090.00616.88
8.3.50.0110.00716.45
8.3.40.0070.01018.68
8.3.30.0160.00018.75
8.3.20.0040.00418.69
8.3.10.0030.00520.53
8.3.00.0050.00319.26
8.2.180.0130.00616.63
8.2.170.0070.00722.96
8.2.160.0130.00022.18
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0060.00326.16
8.2.120.0080.00019.82
8.2.110.0000.00919.46
8.2.100.0040.00717.84
8.2.90.0100.00020.82
8.2.80.0000.00917.91
8.2.70.0000.00817.63
8.2.60.0030.00617.90
8.2.50.0000.00818.07
8.2.40.0000.00718.09
8.2.30.0050.00317.90
8.2.20.0040.00417.66
8.2.10.0000.00717.54
8.2.00.0080.00017.68
8.1.280.0110.00625.92
8.1.270.0100.00324.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00422.53
8.1.230.0090.00321.08
8.1.220.0040.00417.74
8.1.210.0040.00418.91
8.1.200.0090.00317.23
8.1.190.0030.00517.30
8.1.180.0090.00018.10
8.1.170.0040.00418.90
8.1.160.0040.00418.83
8.1.150.0080.00018.58
8.1.140.0050.00517.40
8.1.130.0070.00017.77
8.1.120.0050.00317.30
8.1.110.0070.00017.29
8.1.100.0030.00517.36
8.1.90.0000.00717.36
8.1.80.0000.00717.43
8.1.70.0070.00017.29
8.1.60.0030.00617.53
8.1.50.0030.00517.42
8.1.40.0040.00417.36
8.1.30.0060.00317.52
8.1.20.0000.00917.57
8.1.10.0090.00017.25
8.1.00.0050.00317.23
8.0.300.0040.00419.85
8.0.290.0020.00516.63
8.0.280.0030.00518.40
8.0.270.0030.00317.20
8.0.260.0030.00316.70
8.0.250.0000.00917.01
8.0.240.0090.00017.00
8.0.230.0030.00316.83
8.0.220.0030.00316.89
8.0.210.0040.00416.87
8.0.200.0000.00716.88
8.0.190.0070.00016.84
8.0.180.0070.00016.88
8.0.170.0000.00816.82
8.0.160.0000.00716.81
8.0.150.0040.00416.79
8.0.140.0050.00316.76
8.0.130.0030.00313.35
8.0.120.0030.00516.84
8.0.110.0000.00716.88
8.0.100.0040.00416.96
8.0.90.0000.00816.73
8.0.80.0110.00316.93
8.0.70.0040.00416.89
8.0.60.0000.00716.91
8.0.50.0040.00416.71
8.0.30.0090.01117.04
8.0.20.0110.00617.03
8.0.10.0040.00417.07
8.0.00.0090.01316.75
7.4.330.0050.00012.91
7.4.320.0060.00016.44
7.4.300.0060.00016.56
7.4.290.0000.00816.57
7.4.280.0030.00516.46
7.4.270.0040.00416.57
7.4.260.0050.00013.27
7.4.250.0060.00316.43
7.4.240.0030.00316.54
7.4.230.0040.00416.42
7.4.220.0200.01416.54
7.4.210.0070.00816.53
7.4.200.0030.00316.45
7.4.190.0030.00316.63
7.4.160.0120.00316.45
7.4.150.0110.01516.33
7.4.140.0100.00716.43
7.4.130.0130.01116.37
7.4.120.0100.00716.39
7.4.110.0080.00816.59
7.4.100.0030.01316.35
7.4.90.0070.01316.52
7.4.80.0150.00316.46
7.4.70.0100.01316.54
7.4.60.0090.01216.50
7.4.50.0050.00016.52
7.4.40.0060.00616.59
7.4.30.0080.00816.59
7.4.00.0130.00314.60
7.3.330.0030.00313.26
7.3.320.0040.00413.31
7.3.310.0030.00316.01
7.3.300.0030.00316.29
7.3.290.0190.00016.18
7.3.280.0110.00416.23
7.3.270.0150.00616.43
7.3.260.0080.01416.28
7.3.250.0100.00916.39
7.3.240.0040.01216.30
7.3.230.0120.00916.40
7.3.210.0070.01016.55
7.3.200.0110.00719.39
7.3.190.0130.00916.40
7.3.180.0040.01216.39
7.3.170.0070.01616.31
7.3.160.0140.00016.37
7.3.120.0000.01414.93
7.2.330.0060.01216.64
7.2.320.0090.00916.54
7.2.310.0130.01616.63
7.2.300.0100.00716.42
7.2.290.0000.01716.37
7.2.60.0060.00616.64
7.2.00.0060.00619.26
7.1.200.0030.01215.68
7.1.100.0060.00918.00
7.1.70.0060.00316.79
7.1.60.0100.01019.40
7.1.50.0110.01116.77
7.1.00.0070.07322.33
7.0.200.0340.00014.45
7.0.140.0130.06722.15
7.0.120.0070.07321.96
7.0.110.0100.06019.97
7.0.100.0070.08320.11
7.0.90.0100.09320.03
7.0.80.0170.07719.95
7.0.70.0070.08719.94
7.0.60.0070.05320.02
7.0.50.0130.05020.05
7.0.40.0030.04319.87
7.0.30.0030.05719.66
7.0.20.0100.03319.84
7.0.10.0130.07019.70
7.0.00.0070.03719.73
5.6.280.0000.07720.82
5.6.260.0030.08020.67
5.6.250.0100.04320.73
5.6.240.0030.04320.68
5.6.230.0070.06020.71
5.6.220.0100.08020.70
5.6.210.0070.07020.73
5.6.200.0100.03720.48
5.6.190.0030.06320.57
5.6.180.0030.03720.57
5.6.170.0070.08020.61
5.6.160.0000.08020.57
5.6.150.0030.04320.62
5.6.140.0070.05020.63
5.6.130.0070.04320.56
5.6.120.0070.08320.70
5.6.110.0030.07320.61
5.6.100.0030.08320.64
5.6.90.0100.08020.61
5.6.80.0170.06720.03
5.6.70.0070.05319.99
5.6.60.0100.05020.04
5.6.50.0000.04719.95
5.6.40.0070.08020.01
5.6.30.0100.07319.82
5.6.20.0070.07319.99
5.6.10.0170.04320.05
5.6.00.0100.08019.92
5.5.380.0030.08017.57
5.5.370.0030.06317.54
5.5.360.0030.07317.71
5.5.350.0100.06317.56
5.5.340.0100.07018.09
5.5.330.0030.04318.10
5.5.320.0000.04717.91
5.5.310.0100.06317.95
5.5.300.0070.04017.95
5.5.290.0170.04318.05
5.5.280.0100.07717.90
5.5.270.0030.08018.12
5.5.260.0070.07017.91
5.5.250.0130.07317.91
5.5.240.0130.04317.27
5.5.230.0100.07317.30
5.5.220.0100.06317.28
5.5.210.0100.06317.48
5.5.200.0070.03717.28
5.5.190.0030.04317.28
5.5.180.0100.04717.40
5.5.160.0030.07717.45
5.5.150.0100.07717.43
5.5.140.0100.07717.45
5.5.130.0070.07317.40
5.5.120.0030.08317.47
5.5.110.0030.08317.25
5.5.100.0030.05317.34
5.5.90.0030.04017.34
5.5.80.0030.07017.20
5.5.70.0130.06717.07
5.5.60.0070.04017.37
5.5.50.0070.06317.50
5.5.40.0030.08317.17
5.5.30.0070.05017.34
5.5.20.0100.06317.39
5.5.10.0030.04717.36
5.5.00.0000.04717.16
5.4.450.0170.06719.51
5.4.440.0030.06719.49
5.4.430.0100.07319.58
5.4.420.0000.04319.27
5.4.410.0100.06719.38
5.4.400.0070.07319.32
5.4.390.0000.04719.18
5.4.380.0070.04018.99
5.4.370.0030.06018.99
5.4.360.0100.05318.96
5.4.350.0100.04318.96
5.4.340.0000.05719.24
5.4.320.0130.07319.22
5.4.310.0030.07019.37
5.4.300.0100.06019.16
5.4.290.0130.07019.24
5.4.280.0030.08019.00
5.4.270.0100.06719.01
5.4.260.0070.03719.33
5.4.250.0070.05318.98
5.4.240.0100.07019.13
5.4.230.0070.07019.09
5.4.220.0030.08319.15
5.4.210.0030.07318.94
5.4.200.0000.04718.99
5.4.190.0030.04319.00
5.4.180.0170.06019.16
5.4.170.0130.06719.02
5.4.160.0000.04019.23
5.4.150.0030.04718.97
5.4.140.0030.04716.42
5.4.130.0030.04016.29
5.4.120.0130.05316.36
5.4.110.0100.03016.50
5.4.100.0130.06316.55
5.4.90.0030.06316.65
5.4.80.0000.04016.55
5.4.70.0130.06316.46
5.4.60.0030.05316.63
5.4.50.0070.06716.33
5.4.40.0030.06716.53
5.4.30.0000.07316.24
5.4.20.0130.06316.58
5.4.10.0030.06716.38
5.4.00.0130.06015.83
5.3.290.0100.04314.82
5.3.280.0000.04314.64
5.3.270.0030.07714.84
5.3.260.0130.06314.59
5.3.250.0030.08014.59
5.3.240.0100.04714.63
5.3.230.0100.07014.64
5.3.220.0000.04314.54
5.3.210.0000.05714.55
5.3.200.0000.04314.53
5.3.190.0070.05014.58
5.3.180.0070.04714.43
5.3.170.0070.04014.59
5.3.160.0100.03314.80
5.3.150.0030.04014.58
5.3.140.0030.07014.42
5.3.130.0070.04314.41
5.3.120.0100.08014.51
5.3.110.0170.07314.64
5.3.100.0030.07014.19
5.3.90.0000.05714.05
5.3.80.0170.05014.00
5.3.70.0100.03714.10
5.3.60.0070.07014.02
5.3.50.0000.05013.94
5.3.40.0000.06314.18
5.3.30.0130.06013.92
5.3.20.0170.03713.69
5.3.10.0100.06313.65
5.3.00.0000.04013.66
5.2.170.0000.03312.06
5.2.160.0030.06712.06
5.2.150.0070.03012.06
5.2.140.0070.05312.06
5.2.130.0030.06012.06
5.2.120.0030.05312.06
5.2.110.0070.04012.06
5.2.100.0000.03012.06
5.2.90.0030.04312.06
5.2.80.0030.07012.06
5.2.70.0070.05012.06
5.2.60.0070.05012.06
5.2.50.0070.05312.06
5.2.40.0000.04312.06
5.2.30.0100.04012.06
5.2.20.0000.03312.06
5.2.10.0100.05012.06
5.2.00.0070.05712.06
5.1.60.0070.02312.06
5.1.50.0070.05712.06
5.1.40.0000.05712.06
5.1.30.0030.03012.06
5.1.20.0070.05012.06
5.1.10.0030.04312.06
5.1.00.0030.03312.06
5.0.50.0000.04712.06
5.0.40.0030.02312.06
5.0.30.0000.06312.06
5.0.20.0000.04312.06
5.0.10.0030.03312.06
5.0.00.0000.05712.06
4.4.90.0000.02012.06
4.4.80.0000.01712.06
4.4.70.0030.03012.06
4.4.60.0130.01312.06
4.4.50.0030.03012.06
4.4.40.0170.02712.06
4.4.30.0070.01712.06
4.4.20.0070.02712.06
4.4.10.0000.03312.06
4.4.00.0030.02712.06
4.3.110.0030.02012.06
4.3.100.0030.01712.06
4.3.90.0000.02012.06
4.3.80.0100.04712.06
4.3.70.0000.03712.06
4.3.60.0030.03012.06
4.3.50.0030.01712.06
4.3.40.0000.02712.06
4.3.30.0000.02012.06
4.3.20.0000.01712.06
4.3.10.0000.01712.06
4.3.00.0030.02012.06

preferences:
36.19 ms | 401 KiB | 5 Q