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; class MakeYourTime extends ArrayObject { public function __construct($test) { $this->test = $test; } public function __invoke() { $closure = function() { $this->secret = str_rot13($this->secret); }; return $closure->bindTo($this->test, 'Test'); } public function offsetGet($index) { return 'callback'; } } $test->cats = new MakeYourTime($test); 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.0100.01316.88
8.3.50.0070.01017.58
8.3.40.0170.00018.96
8.3.30.0070.01718.71
8.3.20.0110.00418.76
8.3.10.0040.00420.54
8.3.00.0080.00019.50
8.2.180.0140.00316.50
8.2.170.0140.00722.96
8.2.160.0070.00721.11
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0000.00819.48
8.2.110.0090.00021.03
8.2.100.0070.00417.91
8.2.90.0050.00519.22
8.2.80.0050.00317.93
8.2.70.0030.00617.75
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00418.21
8.2.20.0040.00417.65
8.2.10.0040.00417.76
8.2.00.0030.00517.82
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0050.00520.88
8.1.230.0080.00420.97
8.1.220.0040.00417.74
8.1.210.0060.00318.88
8.1.200.0060.00317.24
8.1.190.0070.00017.53
8.1.180.0040.00418.10
8.1.170.0000.00818.89
8.1.160.0030.00618.83
8.1.150.0000.00818.66
8.1.140.0000.00717.35
8.1.130.0000.00717.81
8.1.120.0000.00817.46
8.1.110.0040.00417.36
8.1.100.0000.00717.51
8.1.90.0040.00417.38
8.1.80.0030.00417.48
8.1.70.0030.00517.36
8.1.60.0040.00417.66
8.1.50.0040.00417.50
8.1.40.0040.00417.46
8.1.30.0000.00817.56
8.1.20.0030.00617.73
8.1.10.0040.00417.56
8.1.00.0000.00817.42
8.0.300.0040.00419.95
8.0.290.0080.00016.75
8.0.280.0030.00318.52
8.0.270.0030.00317.28
8.0.260.0030.00316.84
8.0.250.0040.00417.02
8.0.240.0100.00016.93
8.0.230.0040.00316.86
8.0.220.0000.00716.91
8.0.210.0000.00716.83
8.0.200.0030.00316.99
8.0.190.0080.00416.77
8.0.180.0030.00316.93
8.0.170.0060.00316.90
8.0.160.0040.00416.95
8.0.150.0040.00416.81
8.0.140.0030.00616.76
8.0.130.0060.00013.30
8.0.120.0000.00816.89
8.0.110.0000.00816.93
8.0.100.0000.00816.86
8.0.90.0000.00816.90
8.0.80.0060.01416.92
8.0.70.0030.00516.91
8.0.60.0000.00816.87
8.0.50.0000.00716.77
8.0.30.0140.00617.03
8.0.20.0100.00917.14
8.0.10.0040.00416.88
8.0.00.0130.00816.91
7.4.330.0050.00013.04
7.4.320.0060.00016.49
7.4.300.0000.00616.53
7.4.290.0070.00016.63
7.4.280.0040.00416.66
7.4.270.0030.00316.60
7.4.260.0030.00313.29
7.4.250.0030.00616.66
7.4.240.0070.00016.55
7.4.230.0000.00816.63
7.4.220.0070.01416.62
7.4.210.0070.00816.61
7.4.200.0070.00016.48
7.4.190.0030.00316.66
7.4.160.0000.02116.46
7.4.150.0120.00616.36
7.4.140.0110.00916.57
7.4.130.0130.00516.57
7.4.120.0130.00416.45
7.4.110.0070.01116.61
7.4.100.0100.00716.36
7.4.90.0060.01216.57
7.4.80.0070.01016.58
7.4.70.0030.01316.50
7.4.60.0030.01416.42
7.4.50.0090.00016.63
7.4.40.0140.00316.50
7.4.30.0060.01216.52
7.4.00.0000.01215.05
7.3.330.0000.00613.20
7.3.320.0060.00013.42
7.3.310.0070.00016.42
7.3.300.0030.00316.39
7.3.290.0070.01316.45
7.3.280.0080.01016.38
7.3.270.0070.01016.39
7.3.260.0110.01116.51
7.3.250.0110.01016.46
7.3.240.0030.01316.43
7.3.230.0120.00616.67
7.3.210.0130.00316.54
7.3.200.0060.01819.39
7.3.190.0040.01716.51
7.3.180.0030.01516.66
7.3.170.0140.00716.69
7.3.160.0090.00616.50
7.3.120.0110.00415.02
7.2.330.0140.00316.62
7.2.320.0120.00916.54
7.2.310.0160.01016.44
7.2.300.0100.01316.66
7.2.290.0090.01616.71
7.2.60.0000.01216.68
7.2.00.0030.01019.38
7.1.200.0070.00715.91
7.1.100.0000.01118.18
7.1.70.0000.01017.27
7.1.60.0100.01019.40
7.1.50.0220.01334.88
7.1.00.0030.07722.45
7.0.200.0040.00714.89
7.0.140.0070.06722.09
7.0.120.0030.05722.04
7.0.110.0000.03721.77
7.0.100.0030.05321.77
7.0.90.0000.04321.72
7.0.80.0030.03721.77
7.0.70.0000.07321.77
7.0.60.0000.05321.81
7.0.50.0000.05022.26
7.0.40.0030.04020.04
7.0.30.0100.03720.15
7.0.20.0070.06720.23
7.0.10.0000.04320.02
7.0.00.0100.05720.23
5.6.280.0130.06320.83
5.6.260.0000.03720.61
5.6.250.0000.04020.61
5.6.240.0030.04320.65
5.6.230.0000.04320.70
5.6.220.0000.03720.57
5.6.210.0030.05320.75
5.6.200.0100.04021.04
5.6.190.0030.03721.14
5.6.180.0000.06721.07
5.6.170.0000.03721.21
5.6.160.0000.07021.10
5.6.150.0000.04021.30
5.6.140.0100.04021.20
5.6.130.0030.04021.20
5.6.120.0000.06321.16
5.6.110.0000.04720.93
5.6.100.0000.07021.29
5.6.90.0000.04320.95
5.6.80.0030.03720.68
5.6.70.0030.03320.51
5.6.60.0030.03720.47
5.6.50.0000.03720.58
5.6.40.0030.03020.35
5.6.30.0000.03320.37
5.6.20.0000.04020.32
5.6.10.0030.03020.49
5.6.00.0030.03020.44
5.5.380.0070.03320.35
5.5.370.0030.03320.59
5.5.360.0000.04320.55
5.5.350.0030.04020.42
5.5.340.0000.03720.80
5.5.330.0030.03720.80
5.5.320.0030.05720.89
5.5.310.0000.05720.86
5.5.300.0000.03720.96
5.5.290.0000.04320.82
5.5.280.0030.05020.98
5.5.270.0000.04720.82
5.5.260.0030.04021.00
5.5.250.0070.03320.75
5.5.240.0000.03720.10
5.5.230.0030.03720.21
5.5.220.0000.03320.34
5.5.210.0070.04020.21
5.5.200.0070.03720.27
5.5.190.0030.03320.18
5.5.180.0070.02720.18
5.5.160.0070.03320.27
5.5.150.0000.04020.35
5.5.140.0030.03720.27
5.5.130.0070.03020.40
5.5.120.0030.03720.23
5.5.110.0000.03720.25
5.5.100.0000.03320.22
5.5.90.0000.04020.25
5.5.80.0000.03320.22
5.5.70.0070.03019.99
5.5.60.0000.03720.14
5.5.50.0030.03720.04
5.5.40.0030.03020.12
5.5.30.0070.02720.02
5.5.20.0000.03320.04
5.5.10.0000.03320.25
5.5.00.0030.03720.21
5.4.450.0030.04719.50
5.4.440.0000.04019.51
5.4.430.0030.04719.50
5.4.420.0000.04019.31
5.4.410.0000.04019.38
5.4.400.0000.03719.34
5.4.390.0100.02719.24
5.4.380.0100.02718.99
5.4.370.0070.05019.01
5.4.360.0030.03719.35
5.4.350.0070.02318.95
5.4.340.0000.03318.96
5.4.320.0000.03319.24
5.4.310.0030.02719.31
5.4.300.0000.03718.99
5.4.290.0070.03019.24
5.4.280.0000.04019.00
5.4.270.0000.03319.18
5.4.260.0000.03719.03
5.4.250.0000.03719.17
5.4.240.0000.04319.16
5.4.230.0000.03719.33
5.4.220.0000.03719.06
5.4.210.0030.03019.23
5.4.200.0000.03018.99
5.4.190.0070.03718.98
5.4.180.0030.03319.17
5.4.170.0030.03019.17
5.4.160.0000.03018.99
5.4.150.0030.03719.07
5.4.140.0000.03016.40
5.4.130.0070.02316.51
5.4.120.0030.03016.36
5.4.110.0000.03316.46
5.4.100.0000.03316.54
5.4.90.0030.02716.64
5.4.80.0000.06316.51
5.4.70.0030.06716.61
5.4.60.0070.04316.48
5.4.50.0000.04316.41
5.4.40.0100.04716.45
5.4.30.0000.03716.38
5.4.20.0070.03016.38
5.4.10.0030.06016.53
5.4.00.0000.06715.94
5.3.290.0030.03014.69
5.3.280.0030.02714.63
5.3.270.0000.03014.65
5.3.260.0030.02714.63
5.3.250.0000.03714.62
5.3.240.0100.04014.66
5.3.230.0000.03314.58
5.3.220.0000.03014.61
5.3.210.0000.03714.66
5.3.200.0000.03014.58
5.3.190.0000.03314.62
5.3.180.0000.04314.67
5.3.170.0000.06014.57
5.3.160.0000.05314.73
5.3.150.0000.03314.54
5.3.140.0070.06314.44
5.3.130.0000.03714.70
5.3.120.0030.03714.72
5.3.110.0000.05314.58
5.3.100.0030.03714.05
5.3.90.0000.06014.05
5.3.80.0030.03014.03
5.3.70.0030.06313.89
5.3.60.0030.07014.03
5.3.50.0030.03313.99
5.3.40.0030.03313.82
5.3.30.0000.06314.02
5.3.20.0070.02713.70
5.3.10.0030.06713.81
5.3.00.0100.06013.51
5.2.170.0000.05711.46
5.2.160.0000.02711.46
5.2.150.0000.06711.46
5.2.140.0000.05011.46
5.2.130.0030.03711.46
5.2.120.0000.04711.46
5.2.110.0000.02711.46
5.2.100.0070.05311.46
5.2.90.0000.03011.46
5.2.80.0000.04711.46
5.2.70.0070.02011.46
5.2.60.0070.05011.46
5.2.50.0000.03011.46
5.2.40.0070.04711.46
5.2.30.0030.06311.46
5.2.20.0070.03011.46
5.2.10.0030.05011.46
5.2.00.0030.02711.46
5.1.60.0000.02311.46
5.1.50.0000.03011.46
5.1.40.0030.02011.46
5.1.30.0030.03711.46
5.1.20.0030.02311.46
5.1.10.0000.03311.46
5.1.00.0000.03311.46
5.0.50.0030.03311.46
5.0.40.0030.02311.46
5.0.30.0000.06711.46
5.0.20.0070.03711.46
5.0.10.0000.02011.46
5.0.00.0000.02711.46
4.4.90.0000.02711.46
4.4.80.0070.01311.46
4.4.70.0030.02711.46
4.4.60.0000.02311.46
4.4.50.0000.02711.46
4.4.40.0000.02711.46
4.4.30.0000.03311.46
4.4.20.0030.01011.46
4.4.10.0000.01311.46
4.4.00.0000.03311.46
4.3.110.0000.01711.46
4.3.100.0000.02711.46
4.3.90.0000.02011.46
4.3.80.0000.04011.46
4.3.70.0000.02711.46
4.3.60.0000.02311.46
4.3.50.0000.03311.46
4.3.40.0030.04711.46
4.3.30.0030.03011.46
4.3.20.0000.03311.46
4.3.10.0000.03711.46
4.3.00.0030.03311.46

preferences:
64.97 ms | 401 KiB | 5 Q