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.60.0070.00718.43
8.3.50.0060.00921.99
8.3.40.0170.00318.42
8.3.30.0140.00018.51
8.3.20.0110.00718.48
8.3.10.0000.00721.02
8.3.00.0080.00023.66
8.2.180.0060.01516.32
8.2.170.0040.01122.96
8.2.160.0100.00720.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.07
8.2.110.0110.00019.45
8.2.100.0000.01217.78
8.2.90.0000.00819.09
8.2.80.0040.00417.97
8.2.70.0080.00017.38
8.2.60.0040.00417.91
8.2.50.0000.00918.10
8.2.40.0070.00020.53
8.2.30.0040.00419.14
8.2.20.0000.00717.41
8.2.10.0030.00617.48
8.2.00.0000.00817.49
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0090.00926.35
8.1.250.0000.00728.09
8.1.240.0030.00721.04
8.1.230.0090.00319.09
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0090.00017.10
8.1.180.0000.00818.10
8.1.170.0060.00318.48
8.1.160.0030.00618.90
8.1.150.0000.00721.96
8.1.140.0040.00417.30
8.1.130.0040.00417.83
8.1.120.0020.00517.40
8.1.110.0030.00717.34
8.1.100.0030.00517.38
8.1.90.0040.00417.28
8.1.80.0000.00817.35
8.1.70.0030.00317.24
8.1.60.0040.00417.35
8.1.50.0030.00617.24
8.1.40.0000.00717.30
8.1.30.0000.00817.54
8.1.20.0000.00817.41
8.1.10.0000.00717.36
8.1.00.0040.00417.29
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0030.00318.43
8.0.270.0030.00317.10
8.0.260.0000.00716.70
8.0.250.0000.00716.69
8.0.240.0050.00316.81
8.0.230.0030.00316.81
8.0.220.0030.00316.76
8.0.210.0070.00016.77
8.0.200.0060.00016.70
8.0.190.0040.00416.80
8.0.180.0100.00016.79
8.0.170.0030.00316.78
8.0.160.0040.00416.77
8.0.150.0000.00716.73
8.0.140.0060.00616.61
8.0.130.0050.00013.14
8.0.120.0050.00316.77
8.0.110.0000.00716.67
8.0.100.0040.00416.88
8.0.90.0040.00416.64
8.0.80.0130.01016.75
8.0.70.0040.00416.80
8.0.60.0040.00416.63
8.0.50.0080.00016.59
8.0.30.0110.01216.94
8.0.20.0150.00517.40
8.0.10.0000.00816.95
8.0.00.0130.00516.53
7.4.330.0050.00014.57
7.4.320.0030.00316.48
7.4.300.0040.00416.39
7.4.290.0000.00716.44
7.4.280.0050.00616.28
7.4.270.0040.00416.45
7.4.260.0030.00313.16
7.4.250.0000.00716.40
7.4.240.0000.00716.50
7.4.230.0020.00516.59
7.4.220.0030.01316.55
7.4.210.0070.00716.49
7.4.200.0070.00016.48
7.4.190.0000.00716.62
7.4.160.0110.00516.28
7.4.150.0100.01617.40
7.4.140.0100.01017.86
7.4.130.0070.00916.34
7.4.120.0090.00816.30
7.4.110.0100.00716.43
7.4.100.0130.00316.53
7.4.90.0040.01416.27
7.4.80.0100.00719.37
7.4.70.0100.00716.32
7.4.60.0120.00316.57
7.4.50.0080.00016.33
7.4.40.0080.00622.27
7.4.30.0060.01216.39
7.3.330.0030.00313.16
7.3.320.0020.00213.06
7.3.310.0000.00816.21
7.3.300.0000.00716.13
7.3.290.0070.00716.22
7.3.280.0080.01116.14
7.3.270.0120.00617.40
7.3.260.0100.01218.24
7.3.250.0140.00616.20
7.3.240.0090.00616.48
7.3.230.0100.00716.39
7.3.210.0140.00316.32
7.3.200.0120.00419.39
7.3.190.0030.01316.37
7.3.180.0030.01416.47
7.3.170.0070.00716.27
7.3.160.0110.00516.13
7.2.330.0090.00916.36
7.2.320.0050.01516.59
7.2.310.0130.00716.29
7.2.300.0040.01116.36
7.2.290.0090.00916.28
5.4.40.0070.07016.46
5.4.30.0030.06016.36
5.4.20.0000.07316.34
5.4.10.0100.04716.43
5.4.00.0070.05015.86
5.3.140.0070.06314.48
5.3.130.0100.06314.47
5.3.120.0130.07014.55
5.3.110.0000.06314.61
5.3.100.0070.07014.10
5.3.90.0100.06714.09
5.3.80.0100.05014.13
5.3.70.0000.06014.13
5.3.60.0030.07014.09
5.3.50.0070.06013.95
5.3.40.0070.05313.93
5.3.30.0030.06013.97
5.3.20.0000.07013.61
5.3.10.0070.06013.70
5.3.00.0030.06313.75

preferences:
43.41 ms | 401 KiB | 5 Q