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(string $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.0080.01116.75
8.3.50.0140.00522.03
8.3.40.0070.00718.91
8.3.30.0080.00618.84
8.3.20.0040.00420.33
8.3.10.0080.00023.53
8.3.00.0070.00719.85
8.2.180.0080.01118.54
8.2.170.0110.00422.96
8.2.160.0110.00720.24
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00318.97
8.2.120.0000.00726.35
8.2.110.0000.01020.52
8.2.100.0030.00918.16
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0030.00518.03
8.2.50.0030.00618.07
8.2.40.0040.00422.22
8.2.30.0040.00420.65
8.2.20.0000.00717.79
8.2.10.0040.00418.08
8.2.00.0070.00018.03
8.1.280.0130.00725.92
8.1.270.0050.00520.33
8.1.260.0030.00528.09
8.1.250.0050.00328.09
8.1.240.0040.00423.98
8.1.230.0030.00717.89
8.1.220.0030.00517.79
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0000.00817.46
8.1.180.0040.00418.10
8.1.170.0080.00018.46
8.1.160.0070.00020.77
8.1.150.0070.00018.96
8.1.140.0050.00319.59
8.1.130.0000.00717.70
8.1.120.0000.00717.37
8.1.110.0040.00417.45
8.1.100.0040.00417.46
8.1.90.0000.00717.52
8.1.80.0000.00917.49
8.1.70.0030.00317.40
8.1.60.0000.00717.58
8.1.50.0030.00617.42
8.1.40.0050.00317.52
8.1.30.0000.00917.65
8.1.20.0080.00017.52
8.1.10.0080.00017.61
8.1.00.0030.00617.54
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0070.00017.11
8.0.260.0030.00317.17
8.0.250.0080.00016.93
8.0.240.0030.00316.84
8.0.230.0030.00316.93
8.0.220.0000.00716.84
8.0.210.0030.00316.71
8.0.200.0040.00416.95
8.0.190.0060.00316.96
8.0.180.0070.00016.79
8.0.170.0040.00416.94
8.0.160.0030.00516.85
8.0.150.0050.00316.86
8.0.140.0050.00216.90
8.0.130.0000.00513.29
8.0.120.0030.00616.74
8.0.110.0030.00516.95
8.0.100.0040.00416.95
8.0.90.0040.00416.77
8.0.80.0090.01316.80
8.0.70.0040.00416.94
8.0.60.0070.00016.94
8.0.50.0040.00416.68
8.0.30.0140.00617.11
8.0.20.0090.01217.40
8.0.10.0000.00716.84
8.0.00.0120.00916.70
7.4.330.0050.00016.82
7.4.320.0030.00316.46
7.4.300.0050.00316.45
7.4.290.0000.00716.63
7.4.280.0030.00516.49
7.4.270.0030.00316.63
7.4.260.0030.00316.48
7.4.250.0040.00416.47
7.4.240.0060.00116.49
7.4.230.0030.00316.60
7.4.220.0080.01216.50
7.4.210.0140.00316.51
7.4.200.0000.00716.58
7.4.160.0060.00916.57
7.4.150.0060.01217.40
7.4.140.0100.00817.86
7.4.130.0170.01616.53
7.4.120.0100.00716.40
7.4.110.0120.00616.54
7.4.100.0140.00816.65
7.4.90.0090.01016.64
7.4.80.0180.00319.39
7.4.70.0150.00616.56
7.4.60.0030.01316.39
7.4.50.0020.01216.66
7.4.40.0060.01016.41
7.4.30.0070.01016.47
7.4.10.0130.00716.42
7.4.00.0120.00515.80
7.3.330.0020.00213.29
7.3.320.0050.00013.36
7.3.310.0030.00316.38
7.3.300.0080.00016.23
7.3.290.0070.01016.40
7.3.280.0090.00916.36
7.3.270.0000.01717.40
7.3.260.0150.00716.45
7.3.250.0110.00716.42
7.3.240.0100.01016.36
7.3.230.0070.01016.39
7.3.210.0110.00716.33
7.3.200.0000.01616.17
7.3.190.0030.01316.46
7.3.180.0130.00316.54
7.3.170.0120.00616.65
7.3.160.0100.01016.43
7.3.130.0090.00916.30
7.3.120.0110.00616.37
7.3.110.0090.00316.43
7.3.100.0070.00616.54
7.3.90.0090.00916.46
7.3.80.0070.00716.57
7.3.70.0120.00316.48
7.3.60.0110.00016.52
7.3.50.0100.00316.30
7.3.40.0080.00816.30
7.3.30.0000.01216.40
7.3.20.0100.00718.20
7.3.10.0070.00817.66
7.3.00.0080.00617.35
7.2.330.0110.00516.69
7.2.320.0070.01016.43
7.2.310.0050.01216.75
7.2.300.0090.00916.49
7.2.290.0140.00416.80
7.2.260.0070.01116.30
7.2.250.0090.00916.61
7.2.240.0120.00616.50
7.2.230.0040.01116.39
7.2.220.0030.01216.65
7.2.210.0030.01016.48
7.2.200.0030.00916.49
7.2.190.0040.01116.64
7.2.180.0040.01116.60
7.2.170.0060.01016.69
7.2.160.0060.00616.55
7.2.150.0040.01118.48
7.2.140.0070.00418.61
7.2.130.0020.01217.70
7.2.120.0050.00917.69
7.2.110.0070.00717.72
7.2.100.0100.00817.76
7.2.90.0070.00717.59
7.2.80.0080.00817.72
7.2.70.0080.00517.52
7.2.60.0030.00917.36
7.2.50.0060.00717.77
7.2.40.0050.00517.90
7.2.30.0050.01017.67
7.2.20.0110.00517.47
7.2.10.0060.00617.73
7.2.00.0100.00518.32
7.1.330.0040.01117.27
7.1.320.0130.00317.32
7.1.310.0040.00817.29
7.1.300.0060.00317.41
7.1.290.0090.00617.41
7.1.280.0070.00717.55
7.1.270.0060.00817.61
7.1.260.0060.00617.37
7.1.250.0050.00816.46
7.1.240.0090.00617.35
7.1.230.0100.00717.36
7.1.220.0040.01417.15
7.1.210.0100.00317.41
7.1.200.0110.00316.63
7.1.190.0070.00417.32
7.1.180.0080.00317.30
7.1.170.0060.00617.25
7.1.160.0110.00017.38
7.1.150.0030.00717.46
7.1.140.0070.01117.42
7.1.130.0030.01317.45
7.1.120.0110.00317.45
7.1.110.0060.00817.37
7.1.100.0050.00817.83
7.1.90.0060.00617.29
7.1.80.0060.01017.42
7.1.70.0100.00317.22
7.1.60.0070.01018.37
7.1.50.0050.01617.24
7.1.40.0040.00817.32
7.1.30.0040.01117.42
7.1.20.0090.00617.33
7.1.10.0120.00017.18
7.1.00.0050.04319.88
7.0.330.0080.00717.08
7.0.320.0040.00717.08
7.0.310.0070.01117.06
7.0.300.0080.00617.02
7.0.290.0000.01317.14
7.0.280.0030.00916.92
7.0.270.0030.01317.09
7.0.260.0030.00917.09
7.0.250.0030.00917.18
7.0.240.0030.01017.00
7.0.230.0030.01217.22
7.0.220.0120.00617.12
7.0.210.0070.00317.18
7.0.200.0070.00516.94
7.0.190.0070.00717.00
7.0.180.0070.00717.07
7.0.170.0110.00417.13
7.0.160.0070.00717.14
7.0.150.0000.01817.12
7.0.140.0060.00916.98
7.0.130.0070.00717.02
7.0.120.0070.00717.20
7.0.110.0070.00716.97
7.0.100.0030.01217.01
7.0.90.0040.01216.98
7.0.80.0000.00916.93
7.0.70.0050.00716.97
7.0.60.0030.04819.28
7.0.50.0100.02817.52
7.0.40.0080.04017.63
7.0.30.0150.02517.52
7.0.20.0230.03517.51
7.0.10.0140.03817.53
7.0.00.0100.04317.59
5.6.400.0090.00616.03
5.6.390.0030.01315.84
5.6.380.0060.00616.03
5.6.370.0030.01015.95
5.6.360.0000.01816.00
5.6.350.0040.00816.01
5.6.340.0080.00815.91
5.6.330.0060.00915.82
5.6.320.0080.00415.93
5.6.310.0000.01115.82
5.6.300.0030.01716.03
5.6.290.0070.01016.02
5.6.280.0020.02218.46
5.6.270.0040.01116.03
5.6.260.0060.01215.93
5.6.250.0070.01015.81
5.6.240.0100.00316.04
5.6.230.0070.01015.98
5.6.220.0070.00615.80
5.6.210.0040.02418.25
5.6.200.0060.02316.92
5.6.190.0080.04718.29
5.6.180.0290.03818.25
5.6.170.0120.03218.19
5.6.160.0030.02718.20
5.6.150.0080.04317.19
5.6.140.0030.04117.21
5.6.130.0040.02717.06
5.6.120.0050.04518.38
5.6.110.0090.04018.52
5.6.100.0120.04218.69
5.6.90.0030.02518.56
5.6.80.0050.04818.12
5.6.70.0090.00315.74
5.6.60.0040.00715.83
5.6.50.0090.00615.67
5.6.40.0000.01415.95
5.6.30.0060.01015.81
5.6.20.0100.00315.73
5.6.10.0030.01015.92
5.6.00.0040.01115.66
5.5.380.0080.00416.03
5.5.370.0040.01215.90
5.5.360.0140.00815.95
5.5.350.0140.03018.10
5.5.340.0020.02916.90
5.5.330.0090.03717.98
5.5.320.0330.04318.11
5.5.310.0130.04218.17
5.5.300.0050.02517.02
5.5.290.0030.02316.84
5.5.280.0020.05018.29
5.5.270.0070.02918.40
5.5.260.0050.02518.36
5.5.250.0080.04018.13
5.5.240.0090.01717.92
5.5.230.0030.01015.82
5.5.220.0060.00915.74
5.5.210.0130.00015.61
5.5.200.0000.01415.82
5.5.190.0050.00515.75
5.5.180.0040.00815.50
5.5.170.0110.00715.91
5.5.160.0040.01115.76
5.5.150.0000.01815.81
5.5.140.0110.00715.73
5.5.130.0060.00915.93
5.5.120.0110.00315.71
5.5.110.0070.00715.84
5.5.100.0100.00315.75
5.5.90.0030.00615.90
5.5.80.0110.00715.47
5.5.70.0080.00615.64
5.5.60.0030.01615.86
5.5.50.0080.00815.61
5.5.40.0030.01615.84
5.5.30.0130.00615.81
5.5.20.0030.01215.57
5.5.10.0060.01215.72
5.5.00.0060.00615.80

preferences:
60.78 ms | 401 KiB | 5 Q