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) { print_r($v);exit; $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(){ return $this->secret; }; // 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.70.0120.00318.68
8.3.60.0100.01018.54
8.3.50.0060.01122.11
8.3.40.0040.01118.68
8.3.30.0130.00318.95
8.3.20.0070.00020.16
8.3.10.0080.00022.04
8.3.00.0070.00022.34
8.2.190.0090.01216.58
8.2.180.0180.00416.63
8.2.170.0100.01022.96
8.2.160.0030.01720.35
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0060.00926.16
8.2.120.0050.00319.36
8.2.110.0070.00319.95
8.2.100.0080.00417.91
8.2.90.0040.00419.17
8.2.80.0060.00318.05
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0070.00318.00
8.2.20.0040.00417.60
8.2.10.0050.00217.66
8.2.00.0040.00417.67
8.1.280.0070.01125.92
8.1.270.0060.00322.10
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00624.02
8.1.230.0120.00022.66
8.1.220.0000.00917.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00317.51
8.1.180.0070.00318.10
8.1.170.0000.00818.52
8.1.160.0000.00721.92
8.1.150.0030.00618.56
8.1.140.0030.00617.50
8.1.130.0070.00017.88
8.1.120.0080.00017.48
8.1.110.0080.00017.46
8.1.100.0050.00217.48
8.1.90.0070.00017.44
8.1.80.0000.00717.45
8.1.70.0000.00717.46
8.1.60.0000.00817.58
8.1.50.0000.00817.41
8.1.40.0040.00417.58
8.1.30.0040.00417.64
8.1.20.0030.00617.68
8.1.10.0040.00417.57
8.1.00.0050.00317.50
8.0.300.0040.00418.77
8.0.290.0000.00716.93
8.0.280.0040.00418.50
8.0.270.0040.00417.26
8.0.260.0000.00616.73
8.0.250.0070.00016.87
8.0.240.0040.00416.88
8.0.230.0000.00716.94
8.0.220.0030.00516.91
8.0.210.0000.00716.75
8.0.200.0000.00716.95
8.0.190.0040.00416.98
8.0.180.0030.00316.85
8.0.170.0030.00616.98
8.0.160.0040.00417.05
8.0.150.0050.00316.94
8.0.140.0040.00416.78
8.0.130.0030.00313.35
8.0.120.0060.00316.88
8.0.110.0030.00516.80
8.0.100.0050.00216.81
8.0.90.0000.00716.82
8.0.80.0060.01016.95
8.0.70.0040.00416.75
8.0.60.0050.00317.02
8.0.50.0030.00516.84
8.0.30.0120.00817.07
8.0.20.0110.00817.40
8.0.10.0040.00417.14
8.0.00.0050.01416.71
7.4.330.0020.00215.20
7.4.320.0000.00716.55
7.4.300.0030.00316.61
7.4.290.0000.00716.64
7.4.280.0030.00316.50
7.4.270.0000.00616.55
7.4.260.0040.00416.63
7.4.250.0080.00016.57
7.4.240.0050.00316.48
7.4.230.0040.00416.35
7.4.220.0060.01316.58
7.4.210.0090.00516.52
7.4.200.0000.00716.70
7.4.190.0080.00016.55
7.4.160.0090.01216.85
7.4.150.0110.00617.40
7.4.140.0110.00817.86
7.4.130.0140.00616.62
7.4.120.0080.01016.58
7.4.110.0150.00316.47
7.4.100.0120.00616.67
7.4.90.0060.01016.45
7.4.80.0070.01019.39
7.4.70.0000.01616.44
7.4.60.0090.00616.45
7.4.50.0000.00916.16
7.4.40.0060.01022.77
7.4.30.0100.00616.55
7.4.00.0070.01015.14
7.3.330.0000.00513.47
7.3.320.0030.00313.12
7.3.310.0030.00316.32
7.3.300.0000.00616.43
7.3.290.0070.00716.37
7.3.280.0120.00416.35
7.3.270.0070.01017.40
7.3.260.0130.00416.63
7.3.250.0070.01116.43
7.3.240.0060.01216.32
7.3.230.0060.01216.50
7.3.210.0150.00916.38
7.3.200.0070.01019.39
7.3.190.0130.00916.66
7.3.180.0040.01116.39
7.3.170.0030.01616.44
7.3.160.0090.00616.30
7.3.120.0070.01114.98
7.2.330.0070.01016.84
7.2.320.0120.00916.68
7.2.310.0150.00416.50
7.2.300.0100.01316.50
7.2.290.0000.01616.47
7.2.60.0030.01417.07
7.2.50.0070.00717.14
7.2.00.0030.00919.33
7.1.200.0060.00315.87
7.1.100.0240.01016.80
7.1.70.0030.00716.94
7.1.60.0110.01119.82
7.1.50.0030.01716.86
7.1.00.0030.07322.35
7.0.200.0040.00716.79
7.0.140.0070.07321.95
7.0.60.0030.03021.84
7.0.50.0030.04317.85
7.0.40.0070.04020.08
7.0.30.0200.03720.06
7.0.20.0170.08720.07
7.0.10.0030.04320.23
7.0.00.0100.08720.10
5.6.280.0030.07321.06
5.6.210.0100.04720.75
5.6.200.0030.04018.18
5.6.190.0100.08320.61
5.6.180.0430.05320.55
5.6.170.0270.05320.34
5.6.160.0070.07720.46
5.6.150.0100.06018.29
5.6.140.0030.08718.16
5.6.130.0130.08018.13
5.6.120.0030.04321.00
5.6.110.0000.08721.02
5.6.100.0100.08320.95
5.6.90.0100.07720.89
5.6.80.0000.04320.39
5.5.350.4230.04320.32
5.5.340.0070.04018.09
5.5.330.0130.07720.35
5.5.320.0470.05720.25
5.5.310.0200.04020.27
5.5.300.0030.08317.99
5.5.290.0070.08017.98
5.5.280.0030.06320.89
5.5.270.0000.04720.77
5.5.260.0130.07720.88
5.5.250.0130.07020.59
5.5.240.0000.04020.13
5.4.450.3600.03719.37
5.4.440.3270.03719.45
5.4.430.1130.03719.25
5.4.420.3030.03719.55
5.4.410.3370.03719.34
5.4.400.3700.04018.95
5.4.390.3830.03719.17
5.4.380.3870.03319.14
5.4.370.4030.03719.23
5.4.360.4170.03019.20
5.4.350.4430.04319.21
5.4.340.4500.04019.09
5.4.320.3170.04319.23
5.4.310.3630.03018.93
5.4.300.3800.03018.94
5.4.290.3730.04319.22
5.4.280.3770.04019.22
5.4.270.3970.04018.97
5.4.260.3270.03719.17
5.4.250.3330.04019.00
5.4.240.3800.04019.14
5.4.230.3530.04018.98
5.4.220.3500.04018.94
5.4.210.3870.03719.21
5.4.200.3800.04019.10
5.4.190.3570.04018.93
5.4.180.3500.03719.12
5.4.170.4770.04719.25
5.4.160.3770.03718.93
5.4.150.3870.04018.93
5.4.140.3800.04016.52
5.4.130.3770.04016.35
5.4.120.4300.04316.44
5.4.110.3800.03716.64
5.4.100.4270.03316.47
5.4.90.3900.03316.63
5.4.80.3830.03716.61
5.4.70.4070.03316.51
5.4.60.3830.03316.50
5.4.50.3770.04016.33
5.4.40.4000.03316.54
5.4.30.3630.04016.45
5.4.20.3830.04016.50
5.4.10.3470.04016.23
5.4.00.3630.03715.70
5.3.290.3800.03714.72
5.3.280.3900.03714.75
5.3.270.3930.04314.66
5.3.260.3800.03314.50
5.3.250.3930.04014.53
5.3.240.3770.03714.68
5.3.230.3630.03314.64
5.3.220.3870.03714.61
5.3.210.4000.03314.63
5.3.200.3530.03714.60
5.3.190.3670.04314.64
5.3.180.4130.04314.61
5.3.170.3830.04014.56
5.3.160.3900.03714.60
5.3.150.3770.03714.60
5.3.140.3600.03314.64
5.3.130.3900.03314.48
5.3.120.3570.03714.55
5.3.110.3870.04014.61
5.3.100.3800.03714.05
5.3.90.3900.03714.07
5.3.80.4070.04314.10
5.3.70.4100.03714.03
5.3.60.3570.04014.01
5.3.50.4100.04313.88
5.3.40.3830.04013.91
5.3.30.3600.03713.99
5.3.20.3370.03013.62
5.3.10.2400.03013.82
5.3.00.0170.03313.59
5.2.170.3500.02711.07
5.2.160.3370.02311.15
5.2.150.3030.02711.13
5.2.140.3030.03311.14
5.2.130.3000.03011.11
5.2.120.3030.03011.12
5.2.110.0030.03011.11
5.2.100.0030.02711.12
5.2.90.0800.03011.11
5.2.80.2900.03311.02
5.2.70.3000.03011.15
5.2.60.3030.02011.09
5.2.50.2930.02311.18
5.2.40.2870.03311.01
5.2.30.2570.02710.96
5.2.20.2430.02310.86
5.2.10.2370.03010.84
5.2.00.2400.02310.73
5.1.60.2430.02010.00
5.1.50.2700.0209.91
5.1.40.2670.02010.01
5.1.30.2400.02710.36
5.1.20.2670.02710.51
5.1.10.3170.02310.09
5.1.00.2770.03010.07
5.0.50.1400.0238.62
5.0.40.1530.0208.42
5.0.30.1500.0308.29
5.0.20.1330.0178.22
5.0.10.0000.0408.20
5.0.00.0070.0438.16
4.4.90.1170.0175.82
4.4.80.1670.0105.81
4.4.70.1130.0175.92
4.4.60.1200.0135.84
4.4.50.1170.0175.93
4.4.40.1200.0205.89
4.4.30.1430.0135.84
4.4.20.1600.0175.89
4.4.10.1670.0135.95
4.4.00.1170.0305.80
4.3.110.1430.0105.86
4.3.100.1430.0175.77
4.3.90.0900.0135.79
4.3.80.0070.0505.79
4.3.70.0000.0375.79
4.3.60.0030.0305.68
4.3.50.0070.0235.82
4.3.40.0070.0305.80
4.3.30.0000.0175.68
4.3.20.0000.0335.68
4.3.10.0000.0205.68
4.3.00.0000.0205.68

preferences:
64.35 ms | 401 KiB | 5 Q