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 $fn = function(){ $this->secret = 'hello'; }; $test->secret = $array(); $test->secret = $fn->bindTo($test); // 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.0090.00918.68
8.3.50.0130.00722.09
8.3.40.0080.00618.95
8.3.30.0120.00319.09
8.3.20.0040.00420.21
8.3.10.0080.00022.09
8.3.00.0030.00522.33
8.2.180.0160.00616.50
8.2.170.0110.00422.96
8.2.160.0070.00720.39
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00017.50
8.2.110.0040.00422.08
8.2.100.0060.00619.70
8.2.90.0000.00819.22
8.2.80.0000.00818.05
8.2.70.0050.00317.50
8.2.60.0000.00917.93
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0030.00517.95
8.2.20.0000.00717.72
8.2.10.0040.00417.82
8.2.00.0050.00317.63
8.1.280.0110.00325.92
8.1.270.0060.00322.19
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0050.00523.79
8.1.230.0110.00019.09
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0030.00517.66
8.1.180.0030.00618.10
8.1.170.0000.00818.63
8.1.160.0040.00422.02
8.1.150.0040.00418.57
8.1.140.0040.00717.51
8.1.130.0080.00017.75
8.1.120.0000.00717.48
8.1.110.0000.00817.44
8.1.100.0040.00417.52
8.1.90.0040.00417.34
8.1.80.0040.00417.43
8.1.70.0030.00317.44
8.1.60.0090.00017.63
8.1.50.0050.00217.53
8.1.40.0080.00017.48
8.1.30.0070.00017.63
8.1.20.0030.00517.67
8.1.10.0000.00817.59
8.1.00.0030.00517.57
8.0.300.0030.00318.77
8.0.290.0030.00317.05
8.0.280.0030.00318.40
8.0.270.0070.00017.22
8.0.260.0000.00616.75
8.0.250.0030.00317.02
8.0.240.0040.00416.96
8.0.230.0030.00316.85
8.0.220.0030.00316.75
8.0.210.0040.00416.84
8.0.200.0000.00716.92
8.0.190.0030.00416.94
8.0.180.0040.00316.82
8.0.170.0000.00816.98
8.0.160.0040.00417.02
8.0.150.0000.00717.00
8.0.140.0070.00016.89
8.0.130.0030.00313.33
8.0.120.0040.00416.84
8.0.110.0030.00516.85
8.0.100.0040.00417.03
8.0.90.0040.00416.77
8.0.80.0130.00316.92
8.0.70.0040.00417.09
8.0.60.0000.00716.95
8.0.50.0050.00216.95
8.0.30.0120.00817.24
8.0.20.0140.00517.40
8.0.10.0000.00816.98
8.0.00.0110.00716.75
7.4.330.0000.00515.01
7.4.320.0070.00016.62
7.4.300.0000.00616.57
7.4.290.0000.00716.63
7.4.280.0030.00316.64
7.4.270.0000.00816.58
7.4.260.0000.00816.61
7.4.250.0070.00016.41
7.4.240.0020.00516.47
7.4.230.0040.00416.63
7.4.220.0030.01516.55
7.4.210.0090.00916.52
7.4.200.0030.00516.72
7.4.190.0000.00816.47
7.4.160.0110.00516.42
7.4.150.0140.01017.40
7.4.140.0070.01417.86
7.4.130.0110.00616.54
7.4.120.0080.01016.49
7.4.110.0070.01016.70
7.4.100.0090.01216.60
7.4.90.0070.01016.61
7.4.80.0200.00019.39
7.4.70.0100.00616.70
7.4.60.0150.00316.51
7.4.50.0080.00016.50
7.4.40.0090.00622.77
7.4.30.0060.01116.58
7.4.00.0090.00714.94
7.3.330.0000.00613.30
7.3.320.0050.00013.32
7.3.310.0030.00316.19
7.3.300.0030.00316.33
7.3.290.0090.00916.25
7.3.280.0070.01016.30
7.3.270.0160.00417.40
7.3.260.0040.01316.48
7.3.250.0110.01016.53
7.3.240.0130.00316.34
7.3.230.0130.00716.54
7.3.210.0000.01716.59
7.3.200.0120.00419.39
7.3.190.0180.00316.51
7.3.180.0100.00616.46
7.3.170.0080.00816.41
7.3.160.0060.01016.47
7.3.120.0060.01014.74
7.3.110.0070.01114.67
7.3.100.0070.00714.77
7.3.90.0140.00314.79
7.3.80.0030.01014.90
7.3.70.0040.00714.98
7.3.60.0040.00414.93
7.3.50.0030.01014.56
7.3.40.0040.00714.77
7.3.30.0060.00614.72
7.3.20.0000.00916.74
7.3.10.0050.00916.35
7.3.00.0040.00916.63
7.2.330.0070.01016.54
7.2.320.0100.01416.72
7.2.310.0070.01716.57
7.2.300.0060.01216.76
7.2.290.0100.00716.67
7.2.250.0110.00715.14
7.2.240.0070.01415.00
7.2.230.0030.01014.96
7.2.220.0120.00615.18
7.2.210.0030.00714.80
7.2.200.0130.00015.07
7.2.190.0040.01115.03
7.2.180.0030.00615.07
7.2.170.0000.01215.18
7.2.130.0090.00616.59
7.2.120.0000.01416.67
7.2.110.0030.00916.92
7.2.100.0040.00816.82
7.2.90.0100.00316.83
7.2.80.0090.00616.78
7.2.70.0060.01016.95
7.2.60.0050.00616.80
7.2.50.0110.00316.67
7.2.40.0110.00716.98
7.2.30.0100.00916.56
7.2.20.0080.00816.73
7.2.10.0060.00616.45
7.2.00.0060.00817.79
7.1.330.0070.00715.81
7.1.320.0070.00315.88
7.1.310.0040.01215.65
7.1.300.0100.00315.61
7.1.290.0000.01215.77
7.1.280.0040.01115.80
7.1.270.0080.00315.62
7.1.260.0080.00515.50
7.1.250.0070.00715.66
7.1.200.0080.00815.30
7.1.100.0000.01417.95
7.1.70.0000.00817.05
7.1.60.0070.01419.82
7.1.50.0130.00616.53
7.1.00.0030.07722.51
7.0.200.0040.00716.61
7.0.140.0100.06322.08
7.0.60.0100.07319.98
7.0.50.0100.04317.79
7.0.40.0130.07720.40
7.0.30.0230.08320.36
7.0.20.0170.05320.15
7.0.10.0200.08720.23
7.0.00.0070.04320.10
5.6.280.0070.07020.79
5.6.210.0000.04720.52
5.6.200.0100.06018.24
5.6.190.0070.09020.58
5.6.180.3430.03720.45
5.6.170.0330.04720.51
5.6.160.0030.04720.50
5.6.150.0030.04018.29
5.6.140.0100.05718.29
5.6.130.0070.03718.15
5.6.120.0100.08321.13
5.6.110.0000.06020.99
5.6.100.0100.07720.89
5.6.90.0070.07020.89
5.6.80.0030.04020.38
5.6.70.0200.04020.51
5.5.350.0070.07320.45
5.5.340.0170.07317.93
5.5.330.0070.06320.21
5.5.320.0270.07720.27
5.5.310.0200.05320.36
5.5.300.0070.06017.97
5.5.290.0030.09017.92
5.5.280.0130.07320.70
5.5.270.0000.05320.89
5.5.260.0170.05320.75
5.5.250.0030.04320.75
5.5.240.0000.04020.13
5.4.450.0530.06019.70
5.4.440.0470.06319.30
5.4.430.0130.07319.68
5.4.420.0130.06019.38
5.4.410.0130.05019.41
5.4.400.0800.00018.81
5.4.390.1600.00018.51
5.4.380.0270.05718.61
5.4.370.0170.05318.76
5.4.360.0030.05318.76
5.4.350.0100.06318.48
5.4.340.0100.05018.61
5.4.320.0070.04212.51
5.4.310.0060.03912.50
5.4.300.0060.04012.51
5.4.290.0050.03912.50
5.4.280.0050.03812.40
5.4.270.0130.05718.77
5.4.260.0170.06318.90
5.4.250.0230.07318.80
5.4.240.0130.06018.65
5.4.230.0100.06718.90
5.4.220.0170.05718.74
5.4.210.0100.05718.98
5.4.200.0200.06018.79
5.4.190.0100.05719.09
5.4.180.0170.06718.93
5.4.170.0100.06018.89
5.4.160.0100.06318.79
5.4.150.0100.07318.73
5.4.140.0100.05716.42
5.4.130.0100.05316.40
5.4.120.0100.07316.35
5.4.110.0230.06016.62
5.4.100.0130.04316.50
5.4.90.0130.04716.50
5.4.80.0130.04316.40
5.4.70.0100.04716.40
5.4.60.0030.06016.64
5.4.50.0070.06316.38
5.4.40.0070.05016.38
5.4.30.0130.06016.55
5.4.20.0070.05316.59
5.4.10.0130.05716.35
5.4.00.0200.05316.03
5.3.290.0040.04512.80
5.3.280.0100.05714.58
5.3.270.0030.08014.61
5.3.260.0070.06014.70
5.3.250.0270.07014.54
5.3.240.0100.06314.75
5.3.230.0170.05314.69
5.3.220.0030.06314.55
5.3.210.0030.06014.58
5.3.200.0100.07014.64
5.3.190.0070.05714.66
5.3.180.0130.05014.56
5.3.170.0100.07714.66
5.3.160.0130.05314.64
5.3.150.0070.05314.66
5.3.140.0100.06014.60
5.3.130.0070.06314.64
5.3.120.0070.05314.70
5.3.110.0100.05314.64
5.3.100.0130.05014.19
5.3.90.0200.04014.02
5.3.80.0300.05013.93
5.3.70.0070.05314.09
5.3.60.0100.06314.09
5.3.50.0170.04713.94
5.3.40.0100.06314.04
5.3.30.0130.04714.14
5.3.20.0070.05013.54
5.3.10.0070.07013.63
5.3.00.0100.05313.63
5.2.170.0130.04011.22
5.2.160.0100.03711.13
5.2.150.0070.04311.32
5.2.140.0070.04711.13
5.2.130.0030.04711.05
5.2.120.0030.04711.28
5.2.110.0070.04011.21
5.2.100.0130.05310.94
5.2.90.0070.04711.19
5.2.80.0100.05711.05
5.2.70.0170.03311.17
5.2.60.0000.06311.04
5.2.50.0070.04010.93
5.2.40.0130.04011.09
5.2.30.0130.04711.14
5.2.20.0030.04310.87
5.2.10.0030.04010.82
5.2.00.0070.06010.82
5.1.60.0100.03010.19
5.1.50.0070.0509.95
5.1.40.0030.04010.00
5.1.30.0070.05310.34
5.1.20.0070.04010.35
5.1.10.0130.03010.01
5.1.00.0070.04010.16
5.0.50.0070.0378.59
5.0.40.0030.0378.46
5.0.30.0030.0438.16
5.0.20.0100.0238.15
5.0.10.0100.0338.16
5.0.00.0130.0438.32
4.4.90.0000.0276.73
4.4.80.0030.0306.73
4.4.70.0030.0306.73
4.4.60.0100.0236.73
4.4.50.0130.0236.73
4.4.40.0070.0376.73
4.4.30.0100.0206.73
4.4.20.0030.0236.73
4.4.10.0070.0176.73
4.4.00.0030.0476.73
4.3.110.0030.0276.73
4.3.100.0100.0176.73
4.3.90.0000.0236.73
4.3.80.0030.0476.73
4.3.70.0030.0206.73
4.3.60.0030.0276.73
4.3.50.0030.0206.73
4.3.40.0030.0476.73
4.3.30.0000.0236.73
4.3.20.0030.0206.73
4.3.10.0100.0136.73
4.3.00.0070.0236.47

preferences:
39.15 ms | 401 KiB | 5 Q