3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); final class Container{ private $callables = array(); public function __set($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]; return call_user_func_array($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.0070.00716.50
8.3.50.0110.00418.07
8.3.40.0000.01418.84
8.3.30.0080.00618.87
8.3.20.0000.00820.34
8.3.10.0050.00323.48
8.3.00.0040.00419.62
8.2.180.0120.00316.38
8.2.170.0210.00022.96
8.2.160.0110.00420.39
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0060.00319.30
8.2.120.0050.00326.35
8.2.110.0000.00920.41
8.2.100.0060.00618.05
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0080.00022.09
8.2.30.0000.00720.73
8.2.20.0070.00017.71
8.2.10.0000.00718.05
8.2.00.0070.00018.10
8.1.280.0120.00325.92
8.1.270.0040.00420.37
8.1.260.0050.00228.09
8.1.250.0080.00028.09
8.1.240.0040.00423.92
8.1.230.0090.00317.89
8.1.220.0090.00017.79
8.1.210.0030.00518.77
8.1.200.0000.00917.25
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0030.00320.68
8.1.150.0040.00418.89
8.1.140.0000.00819.58
8.1.130.0000.00717.57
8.1.120.0040.00317.52
8.1.110.0040.00417.47
8.1.100.0060.00317.49
8.1.90.0000.00817.51
8.1.80.0040.00417.45
8.1.70.0070.00017.38
8.1.60.0030.00517.50
8.1.50.0000.00817.57
8.1.40.0000.00817.41
8.1.30.0040.00417.56
8.1.20.0000.00717.60
8.1.10.0040.00417.51
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0030.00318.37
8.0.270.0000.00717.19
8.0.260.0070.00017.20
8.0.250.0000.00716.82
8.0.240.0030.00316.81
8.0.230.0050.00316.88
8.0.220.0030.00316.86
8.0.210.0050.00316.80
8.0.200.0030.00616.81
8.0.190.0000.00816.96
8.0.180.0000.00716.93
8.0.170.0000.00816.91
8.0.160.0000.00716.79
8.0.150.0040.00416.84
8.0.140.0040.00416.87
8.0.130.0030.00313.35
8.0.120.0000.00816.82
8.0.110.0040.00416.80
8.0.100.0030.00316.91
8.0.90.0080.00016.76
8.0.80.0110.00316.90
8.0.70.0040.00416.84
8.0.60.0000.00716.75
8.0.50.0000.00716.92
8.0.30.0140.01017.14
8.0.20.0070.01217.40
8.0.10.0040.00417.02
8.0.00.0110.00816.82
7.4.330.0030.00316.79
7.4.320.0000.00816.39
7.4.300.0050.00316.50
7.4.290.0000.00716.57
7.4.280.0000.00816.41
7.4.270.0000.00716.48
7.4.260.0000.00716.62
7.4.250.0050.00216.36
7.4.240.0040.00316.46
7.4.230.0000.00716.69
7.4.220.0160.00316.44
7.4.210.0090.00616.52
7.4.200.0000.00716.66
7.4.160.0070.01116.45
7.4.150.0140.00617.40
7.4.140.0110.00817.86
7.4.130.0150.00416.33
7.4.120.0090.00816.47
7.4.110.0110.00716.47
7.4.100.0150.00616.52
7.4.90.0110.00616.56
7.4.80.0120.00619.39
7.4.70.0070.01016.30
7.4.60.0090.00616.52
7.4.50.0060.00916.29
7.4.40.0030.01416.25
7.4.30.0090.00916.43
7.4.00.0120.00315.02
7.3.330.0050.00013.18
7.3.320.0020.00213.30
7.3.310.0030.00516.38
7.3.300.0040.00416.21
7.3.290.0090.00416.35
7.3.280.0090.00816.32
7.3.270.0140.00317.40
7.3.260.0120.00716.28
7.3.250.0080.01316.52
7.3.240.0110.00916.31
7.3.230.0080.00816.39
7.3.210.0360.02716.34
7.3.200.0140.00416.38
7.3.190.0070.01016.45
7.3.180.0030.01316.65
7.3.170.0090.01216.41
7.3.160.0110.00516.49
7.3.10.0040.00716.70
7.3.00.0080.00716.62
7.2.330.0100.00716.87
7.2.320.0030.01316.80
7.2.310.0070.01016.59
7.2.300.0030.01416.75
7.2.290.0120.00416.81
7.2.130.0060.00716.79
7.2.120.0050.00817.00
7.2.110.0070.00816.75
7.2.100.0070.00816.92
7.2.90.0060.00816.79
7.2.80.0050.00916.98
7.2.70.0050.00716.73
7.2.60.0060.00716.91
7.2.50.0020.01116.89
7.2.40.0070.00716.98
7.2.30.0080.00817.00
7.2.20.0060.00516.91
7.2.10.0080.00417.09
7.2.00.0080.00517.75
7.1.250.0040.00715.75
7.1.200.0090.00315.91
7.1.100.0030.01418.39
7.1.70.0000.00817.19
7.1.60.0120.01219.44
7.1.50.0090.01616.79
7.1.00.0030.07722.35
7.0.200.0030.00516.82
7.0.60.0300.05719.86
7.0.50.0000.09017.95
7.0.40.0130.03720.05
7.0.30.0170.05020.19
7.0.20.0200.05720.09
7.0.10.0100.03720.06
7.0.00.0000.09020.34
5.6.280.0030.03720.82
5.6.210.0100.07720.77
5.6.200.0130.05718.18
5.6.190.0130.07020.33
5.6.180.0170.07720.61
5.6.170.0300.06720.46
5.6.160.0030.05020.46
5.6.150.0070.04318.29
5.6.140.0070.07318.23
5.6.130.0030.06718.15
5.6.120.0170.03321.00
5.6.110.0030.05320.90
5.6.100.0130.05321.00
5.6.90.0030.08721.14
5.6.80.0130.07720.38
5.5.350.0070.09020.43
5.5.340.0200.04018.05
5.5.330.0200.07020.25
5.5.320.0270.08320.34
5.5.310.0130.06020.27
5.5.300.0130.07317.95
5.5.290.0100.07718.07
5.5.280.0000.05320.88
5.5.270.0070.07720.88
5.5.260.0100.07320.77
5.5.250.0170.07720.68
5.5.240.3930.03320.20

preferences:
58.64 ms | 400 KiB | 5 Q