3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Container{ private $callables = []; public function __set(string $name,$value){ if($value instanceof Closure){ $this->callables[$name] = $value; } } public function __call($method, array $args){ if(isset($this->callables[$method])){ $callable = $this->callables[$method]; $callable($args); } } } $container = new Container(); $container->demo = function(){ return new Container(); }; var_dump($container->demo());

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.0090.00916.63
8.3.50.0160.00522.07
8.3.40.0070.00718.93
8.3.30.0110.00318.80
8.3.20.0080.00020.38
8.3.10.0080.00023.54
8.3.00.0080.00020.04
8.2.180.0130.00318.54
8.2.170.0070.00722.96
8.2.160.0140.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00019.32
8.2.120.0000.00826.35
8.2.110.0130.01020.51
8.2.100.0040.00817.83
8.2.90.0080.00019.22
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0050.00317.91
8.2.50.0060.00318.07
8.2.40.0030.00622.32
8.2.30.0040.00420.70
8.2.20.0040.00417.75
8.2.10.0040.00418.03
8.2.00.0070.00018.00
8.1.280.0070.01125.92
8.1.270.0030.00620.38
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0040.00421.94
8.1.230.0030.00820.95
8.1.220.0000.00817.78
8.1.210.0050.00318.77
8.1.200.0070.00317.36
8.1.190.0060.00317.35
8.1.180.0000.00718.10
8.1.170.0030.00618.61
8.1.160.0000.00720.72
8.1.150.0000.00718.79
8.1.140.0030.00619.50
8.1.130.0070.00017.61
8.1.120.0040.00317.40
8.1.110.0000.00717.35
8.1.100.0050.00217.52
8.1.90.0000.00717.37
8.1.80.0060.00317.46
8.1.70.0030.00317.44
8.1.60.0000.00717.63
8.1.50.0000.00817.43
8.1.40.0040.00417.43
8.1.30.0000.00817.70
8.1.20.0000.00817.63
8.1.10.0040.00417.63
8.1.00.0000.00717.52
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0000.00718.31
8.0.270.0030.00317.11
8.0.260.0030.00317.06
8.0.250.0000.00716.78
8.0.240.0000.00716.84
8.0.230.0000.00716.83
8.0.220.0080.00016.87
8.0.210.0000.00716.83
8.0.200.0060.00316.83
8.0.190.0000.01116.85
8.0.180.0000.00716.81
8.0.170.0000.00716.91
8.0.160.0040.00416.94
8.0.150.0050.00216.87
8.0.140.0000.00816.74
8.0.130.0000.00713.32
8.0.120.0090.00016.79
8.0.110.0040.00416.75
8.0.100.0050.00216.91
8.0.90.0000.00716.83
8.0.80.0090.00616.88
8.0.70.0040.00416.82
8.0.60.0000.00716.86
8.0.50.0040.00416.91
8.0.30.0120.00917.12
8.0.20.0110.01117.40
8.0.10.0040.00417.07
8.0.00.0100.00716.87
7.4.330.0020.00216.66
7.4.320.0000.00616.57
7.4.300.0030.00316.61
7.4.290.0070.00016.48
7.4.280.0030.00516.59
7.4.270.0030.00316.43
7.4.260.0030.00516.58
7.4.250.0000.00716.55
7.4.240.0020.00516.60
7.4.230.0070.00016.31
7.4.220.0090.00916.63
7.4.210.0100.00716.53
7.4.200.0030.00316.60
7.4.160.0110.00416.40
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0190.01616.44
7.4.120.0060.01216.51
7.4.110.0030.01416.59
7.4.100.0100.01016.49
7.4.90.0070.01116.61
7.4.80.0090.00919.39
7.4.70.0090.00816.38
7.4.60.0080.00816.57
7.4.50.0120.00316.25
7.4.40.0120.00416.61
7.4.30.0060.01016.53
7.4.00.0050.01114.90
7.3.330.0000.00513.32
7.3.320.0030.00313.20
7.3.310.0000.00716.26
7.3.300.0000.00716.23
7.3.290.0090.00616.35
7.3.280.0080.01016.34
7.3.270.0090.00917.40
7.3.260.0150.00616.47
7.3.250.0080.01016.45
7.3.240.0110.00816.38
7.3.230.0100.00716.63
7.3.210.0070.01016.38
7.3.200.0130.00316.27
7.3.190.0130.00316.46
7.3.180.0100.01016.27
7.3.170.0040.01216.36
7.3.160.0090.00616.73
7.3.120.0100.01014.74
7.3.110.0060.01314.70
7.3.100.0000.01515.06
7.3.90.0070.00714.91
7.3.80.0030.01415.00
7.3.70.0090.00014.93
7.3.60.0100.00714.98
7.3.50.0080.00414.78
7.3.40.0000.00814.95
7.3.30.0040.01114.85
7.3.20.0070.00716.71
7.3.10.0100.00616.75
7.3.00.0100.00716.72
7.2.330.0060.01316.63
7.2.320.0110.00616.80
7.2.310.0090.00916.55
7.2.300.0110.01116.48
7.2.290.0070.01016.58
7.2.250.0100.00715.00
7.2.240.0070.01315.04
7.2.230.0030.01515.03
7.2.220.0030.01214.85
7.2.210.0040.01414.92
7.2.200.0070.00715.04
7.2.190.0060.01015.03
7.2.180.0080.00415.23
7.2.170.0040.00815.14
7.2.60.0030.01017.01
7.2.00.0080.00419.62
7.1.330.0060.00615.85
7.1.320.0070.00715.87
7.1.310.0080.00815.80
7.1.300.0030.01315.66
7.1.290.0030.01015.88
7.1.280.0030.00915.59
7.1.270.0000.00915.88
7.1.260.0040.00815.79
7.1.200.0060.00915.94
7.1.100.0040.00718.07
7.1.70.0000.00817.30
7.1.60.0130.01019.44
7.1.50.0130.01316.93
7.1.00.0070.07322.52
7.0.200.0030.00616.63
7.0.60.0070.04020.00
7.0.50.0070.08317.86
7.0.40.0000.05720.05
7.0.30.0270.05720.17
7.0.20.0200.08320.06
7.0.10.0130.05020.07
7.0.00.0000.05020.07
5.6.280.0000.03721.00
5.6.210.0100.04720.73
5.6.200.0070.08318.18
5.6.190.0170.05320.52
5.6.180.0270.06720.61
5.6.170.0200.04720.47
5.6.160.0100.08020.46
5.6.150.0030.08318.15
5.6.140.0030.06318.28
5.6.130.0130.03318.23
5.6.120.0070.04320.97
5.6.110.0130.05021.14
5.6.100.0130.06321.01
5.6.90.0200.07321.11
5.6.80.0000.08720.49
5.5.350.0100.08320.34
5.5.340.0070.03718.04
5.5.330.0130.08020.46
5.5.320.0330.07320.30
5.5.310.0200.04320.28
5.5.300.0070.07717.98
5.5.290.0100.05018.08
5.5.280.0000.04320.78
5.5.270.0070.04020.95
5.5.260.0030.09020.83
5.5.250.0070.08320.69
5.5.240.4100.03320.09

preferences:
62.33 ms | 401 KiB | 5 Q