3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $secret = 'Nyy lbhe Onfr ner orybat gb hf.'; private $callback; final public function run() { call_user_func($this->callback); return $this->secret . PHP_EOL; } public function __set($k, $v) { $key = $v[($v[$v])]; // $v is some kind of weird array $value = $v(); // and a callback! $this->{$key} = $value; } } $test = new Test; // start editing here $cl1 = static function() { return $this->secret; }; Closure::bind($cl1, null, $test); $test->secret = array(); // end editing here echo $test->run();

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.0160.00318.31
8.3.50.0080.01022.11
8.3.40.0070.00718.83
8.3.30.0090.00618.90
8.3.20.0040.00420.27
8.3.10.0000.00822.09
8.3.00.0080.00022.38
8.2.180.0140.00716.88
8.2.170.0090.00622.96
8.2.160.0130.00020.39
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0150.00026.16
8.2.120.0050.00317.63
8.2.110.0080.00322.26
8.2.100.0080.00317.97
8.2.90.0000.00817.75
8.2.80.0080.00017.97
8.2.70.0000.00818.04
8.2.60.0000.00817.93
8.2.50.0000.00818.10
8.2.40.0040.00420.60
8.2.30.0030.00518.02
8.2.20.0020.00517.89
8.2.10.0000.00817.82
8.2.00.0070.00017.87
8.1.280.0160.00625.92
8.1.270.0080.00022.01
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00923.90
8.1.230.0040.00819.13
8.1.220.0090.00017.79
8.1.210.0050.00318.77
8.1.200.0060.00317.22
8.1.190.0000.00817.35
8.1.180.0080.00618.10
8.1.170.0040.00418.57
8.1.160.0030.00622.04
8.1.150.0080.00018.56
8.1.140.0050.00517.32
8.1.130.0040.00417.76
8.1.120.0050.00317.48
8.1.110.0000.00717.36
8.1.100.0050.00317.54
8.1.90.0050.00217.37
8.1.80.0040.00417.38
8.1.70.0000.00717.42
8.1.60.0000.00817.64
8.1.50.0000.00717.52
8.1.40.0080.00017.50
8.1.30.0000.00817.59
8.1.20.0050.00317.56
8.1.10.0000.00917.49
8.1.00.0030.00517.57
8.0.300.0040.00419.64
8.0.290.0030.00616.63
8.0.280.0030.00318.42
8.0.270.0030.00317.22
8.0.260.0000.00716.84
8.0.250.0000.00716.86
8.0.240.0030.00316.89
8.0.230.0030.00316.91
8.0.220.0070.00016.80
8.0.210.0080.00016.95
8.0.200.0060.00017.01
8.0.190.0040.00417.04
8.0.180.0040.00417.02
8.0.170.0050.00316.98
8.0.160.0040.00416.95
8.0.150.0040.00416.91
8.0.140.0000.00716.92
8.0.130.0060.00013.33
8.0.120.0040.00416.94
8.0.110.0040.00416.91
8.0.100.0080.00016.77
8.0.90.0030.00316.84
8.0.80.0030.01916.99
8.0.70.0070.00016.86
8.0.60.0000.00816.87
8.0.50.0000.00716.95
8.0.30.0130.00717.13
8.0.20.0120.01817.40
8.0.10.0000.00716.98
8.0.00.0140.00816.88
7.4.330.0050.00015.14
7.4.320.0030.00316.64
7.4.300.0000.00616.63
7.4.290.0000.00716.44
7.4.280.0030.00316.56
7.4.270.0000.00616.63
7.4.260.0030.00316.41
7.4.250.0030.00516.59
7.4.240.0020.00516.53
7.4.230.0030.00316.63
7.4.220.0060.01116.56
7.4.210.0120.00516.64
7.4.200.0070.00016.68
7.4.190.0030.00316.56
7.4.160.0060.00916.43
7.4.150.0080.00917.40
7.4.140.0080.01017.86
7.4.130.0070.00916.54
7.4.120.0090.00816.55
7.4.110.0070.01116.79
7.4.100.0140.00416.60
7.4.90.0070.01016.45
7.4.80.0110.01119.39
7.4.70.0090.00616.41
7.4.60.0060.01016.43
7.4.50.0030.00516.68
7.4.40.0000.01722.77
7.4.30.0070.01016.59
7.4.00.0060.01015.14
7.3.330.0000.00513.31
7.3.320.0030.00313.45
7.3.310.0040.00416.46
7.3.300.0000.00716.45
7.3.290.0100.01016.36
7.3.280.0070.00916.38
7.3.270.0100.00717.40
7.3.260.0080.00916.38
7.3.250.0140.00416.41
7.3.240.0070.01016.33
7.3.230.0130.00316.62
7.3.210.0060.01116.42
7.3.200.0100.01019.39
7.3.190.0090.01216.43
7.3.180.0030.01316.49
7.3.170.0040.01216.37
7.3.160.0060.01516.46
7.3.120.0030.01514.96
7.3.110.0070.01015.07
7.3.100.0030.01214.79
7.3.90.0100.00714.68
7.3.80.0060.00314.93
7.3.70.0090.00614.80
7.3.60.0060.00614.66
7.3.50.0040.01214.92
7.3.40.0060.00614.79
7.3.30.0060.00914.75
7.3.20.0040.00816.54
7.3.10.0070.00716.52
7.3.00.0110.00016.75
7.2.330.0080.00916.43
7.2.320.0080.01216.59
7.2.310.0060.01116.67
7.2.300.0070.01116.78
7.2.290.0060.01516.71
7.2.240.0000.01414.97
7.2.230.0070.00715.17
7.2.220.0040.01215.06
7.2.210.0030.00914.97
7.2.200.0070.00715.03
7.2.190.0060.01014.97
7.2.180.0070.00715.05
7.2.170.0030.01014.84
7.2.160.0000.01314.71
7.2.150.0100.00716.85
7.2.140.0070.01116.64
7.2.130.0030.01016.98
7.2.120.0110.00316.80
7.2.110.0090.00616.92
7.2.100.0060.00916.89
7.2.90.0060.00917.05
7.2.80.0030.00816.90
7.2.70.0100.00016.93
7.2.60.0070.00616.74
7.2.50.0030.01016.98
7.2.40.0070.00716.89
7.2.30.0070.01016.90
7.2.20.0060.01316.91
7.2.10.0070.01116.92
7.2.00.0050.00817.93
7.1.330.0040.01215.76
7.1.320.0030.00715.61
7.1.310.0040.00816.11
7.1.300.0120.00315.86
7.1.290.0100.00315.86
7.1.280.0110.00015.96
7.1.270.0060.00615.72
7.1.260.0040.01115.76
7.1.250.0080.00615.70
7.1.200.0110.00315.77
7.1.70.0030.01016.99
7.1.60.0030.01017.32
7.1.50.0060.01917.00
7.1.00.0100.07022.35
7.0.200.0030.00916.73
7.0.140.0070.07021.95
7.0.60.0100.06720.05
7.0.50.0100.07717.85
7.0.40.0030.04720.24
7.0.30.0600.06720.26
7.0.20.0230.05320.23
7.0.10.0100.07720.23
7.0.00.0030.04320.09
5.6.280.0070.07020.81
5.6.210.0100.03720.66
5.6.200.0070.08018.22
5.6.190.0130.06020.33
5.6.180.0300.07720.77
5.6.170.0270.05020.48
5.6.160.0030.08320.46
5.6.150.0030.08318.27
5.6.140.0070.05318.11
5.6.130.0070.08718.27
5.6.120.0030.08020.85
5.6.110.0070.08320.99
5.6.100.0070.08021.06
5.6.90.0030.07021.00
5.6.80.0100.08320.41
5.5.350.0230.07720.41
5.5.340.0030.08317.96
5.5.330.0070.07720.28
5.5.320.0270.03720.38
5.5.310.0270.04720.30
5.5.300.0100.07317.98
5.5.290.0000.08717.94
5.5.280.0030.07320.88
5.5.270.0130.08020.76
5.5.260.0100.07020.88
5.5.250.0130.06720.69
5.5.240.0130.03720.16
5.4.450.0170.05019.39
5.4.440.0600.03319.39
5.4.430.0400.04319.48
5.4.420.0230.04719.32
5.4.410.0330.04319.39
5.4.400.0200.03719.32
5.4.390.0170.03319.31
5.4.380.0230.05718.75
5.4.370.0270.07718.78
5.4.360.0570.04718.74
5.4.350.0270.05718.57
5.4.340.0230.05718.84
5.4.320.0060.03812.51
5.4.310.0060.03912.51
5.4.300.0060.03712.51
5.4.290.0050.04012.50
5.4.280.0100.03812.40
5.4.270.0100.08018.77
5.4.260.0130.05718.84
5.4.250.0170.07319.00
5.4.240.0100.05319.00
5.4.230.0130.05018.75
5.4.220.0200.06319.01
5.4.210.0130.07319.00
5.4.200.0100.07319.01
5.4.190.0130.07319.02
5.4.180.0070.08318.96
5.4.170.0030.06318.83
5.4.160.0100.05018.96
5.4.150.0200.06718.78
5.4.140.0130.07016.35
5.4.130.0130.05016.31
5.4.120.0100.05016.50
5.4.110.0130.05716.34
5.4.100.0030.05716.34
5.4.90.0100.05316.32
5.4.80.0030.06316.64
5.4.70.0100.04316.37
5.4.60.0130.06716.39
5.4.50.0130.04316.59
5.4.40.0070.07016.62
5.4.30.0170.04016.50
5.4.20.0130.05716.54
5.4.10.0170.05016.36
5.4.00.0100.06015.85
5.3.290.0090.04112.80
5.3.280.0030.07314.59
5.3.270.0100.07714.44
5.3.260.0070.07314.83
5.3.250.0100.07014.69
5.3.240.0100.05014.60
5.3.230.0170.05714.57
5.3.220.0170.06014.64
5.3.210.0200.06014.66
5.3.200.0170.06014.76
5.3.190.0000.06014.79
5.3.180.0100.05014.57
5.3.170.0100.07714.48
5.3.160.0100.05314.79
5.3.150.0100.07014.66
5.3.140.0270.05714.57
5.3.130.0070.07714.72
5.3.120.0070.08014.71
5.3.110.0170.04714.57
5.3.100.0170.04014.27
5.3.90.0030.07714.11
5.3.80.0030.05713.94
5.3.70.0100.06314.04
5.3.60.0030.05714.17
5.3.50.0030.06014.03
5.3.40.0100.05013.78
5.3.30.0070.07013.98
5.3.20.0070.07013.79
5.3.10.0070.07013.65
5.3.00.0230.03313.86
5.2.170.0100.04011.36
5.2.160.0070.04311.22
5.2.150.0130.05011.37
5.2.140.0100.05311.23
5.2.130.0000.05011.00
5.2.120.0070.06311.07
5.2.110.0100.04711.10
5.2.100.0070.05711.18
5.2.90.0030.04311.18
5.2.80.0030.04311.00
5.2.70.0070.05311.18
5.2.60.0030.04711.13
5.2.50.0030.05711.09
5.2.40.0070.04711.10
5.2.30.0070.05310.81
5.2.20.0030.05710.86
5.2.10.0070.04011.03
5.2.00.0100.04310.89
5.1.60.0100.0439.95
5.1.50.0100.04310.04
5.1.40.0070.04710.14
5.1.30.0030.03710.55
5.1.20.0030.04310.34
5.1.10.0070.04710.16
5.1.00.0230.03310.09
5.0.50.0100.0378.34
5.0.40.0030.0278.37
5.0.30.0070.0408.19
5.0.20.0070.0278.44
5.0.10.0100.0278.34
5.0.00.0000.0538.22
4.4.90.0100.0235.87
4.4.80.0070.0205.87
4.4.70.0070.0206.34
4.4.60.0170.0176.34
4.4.50.0000.0236.34
4.4.40.0030.0376.34
4.4.30.0030.0236.34
4.4.20.0100.0206.34
4.4.10.0070.0276.34
4.4.00.0070.0336.34
4.3.110.0100.0236.34
4.3.100.0030.0206.34
4.3.90.0100.0236.34
4.3.80.0100.0406.34
4.3.70.0030.0276.34
4.3.60.0030.0276.34
4.3.50.0000.0236.34
4.3.40.0000.0476.34
4.3.30.0000.0236.34
4.3.20.0030.0206.34
4.3.10.0070.0236.34
4.3.00.0030.01713.50

preferences:
72.86 ms | 401 KiB | 5 Q