3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hail{ public function __call($method,$args) { return $this->$method(); } public function __construct() { $this->monday = function(){ return "monday"; }; $this->hello_monday = function(){ $monday = $this->monday; echo "what a beautiful ".$monday()."!"; }; } } $hoi = new Hail(); $function = $hoi->{"hello_monday"}; $function();

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.00616.75
8.3.50.0100.00817.60
8.3.40.0150.00018.96
8.3.30.0070.00718.84
8.3.20.0030.00618.77
8.3.10.0050.00318.85
8.3.00.0040.00419.38
8.2.180.0110.00416.50
8.2.170.0040.01122.96
8.2.160.0120.00418.66
8.2.150.0040.00424.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0050.00222.27
8.2.110.0030.00620.39
8.2.100.0080.00417.91
8.2.90.0050.00318.05
8.2.80.0090.00018.78
8.2.70.0080.00017.50
8.2.60.0000.00917.63
8.2.50.0000.00817.80
8.2.40.0060.00319.23
8.2.30.0000.00817.70
8.2.20.0060.00517.63
8.2.10.0040.00417.61
8.2.00.0000.00817.71
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.71
8.1.230.0110.00020.87
8.1.220.0080.00018.69
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00217.48
8.1.180.0060.00318.10
8.1.170.0050.00317.62
8.1.160.0000.00718.88
8.1.150.0040.00418.65
8.1.140.0030.00517.42
8.1.130.0000.00719.23
8.1.120.0050.00217.43
8.1.110.0030.00317.45
8.1.100.0030.00417.45
8.1.90.0040.00417.50
8.1.80.0030.00317.36
8.1.70.0030.00317.37
8.1.60.0030.00617.62
8.1.50.0000.00817.31
8.1.40.0050.00517.51
8.1.30.0030.00517.59
8.1.20.0050.00317.50
8.1.10.0000.00717.56
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0080.00018.57
8.0.270.0030.00317.27
8.0.260.0030.00316.83
8.0.250.0000.00716.81
8.0.240.0000.00716.98
8.0.230.0030.00616.98
8.0.220.0000.00716.88
8.0.210.0000.00816.89
8.0.200.0070.00016.93
8.0.190.0080.00016.98
8.0.180.0000.00716.96
8.0.170.0000.00916.80
8.0.160.0030.00416.86
8.0.150.0000.00816.80
8.0.140.0040.00416.76
8.0.130.0030.00313.28
8.0.120.0000.00916.75
8.0.110.0000.00816.83
8.0.100.0040.00416.96
8.0.90.0070.00016.77
8.0.80.0040.01116.85
8.0.70.0000.00716.73
8.0.60.0060.00317.01
8.0.50.0000.01016.77
8.0.30.0180.00016.89
8.0.20.0080.01017.22
8.0.10.0040.00416.89
8.0.00.0090.00916.68
7.4.330.0000.00512.98
7.4.320.0000.00616.42
7.4.300.0000.00816.62
7.4.290.0030.00316.63
7.4.280.0000.00816.52
7.4.270.0030.00316.46
7.4.260.0070.00013.38
7.4.250.0030.00616.57
7.4.240.0080.00016.61
7.4.230.0000.00716.60
7.4.220.0100.01016.50
7.4.210.0110.00616.66
7.4.200.0030.00516.57
7.4.190.0000.00716.46
7.4.160.0120.00416.49
7.4.150.0170.00316.49
7.4.140.0120.00617.86
7.4.130.0060.01216.46
7.4.120.0060.01616.41
7.4.110.0120.00616.70
7.4.100.0070.01316.41
7.4.90.0130.00616.58
7.4.80.0090.01219.39
7.4.70.0070.01416.63
7.4.60.0000.01616.59
7.4.50.0040.00016.48
7.4.40.0110.00416.55
7.4.30.0030.01716.58
7.4.00.0110.00715.00
7.3.330.0060.00013.17
7.3.320.0080.00013.29
7.3.310.0040.00416.27
7.3.300.0030.00316.18
7.3.290.0050.00916.34
7.3.280.0090.01016.36
7.3.270.0180.01216.56
7.3.260.0030.01316.54
7.3.240.0030.01316.32
7.3.230.0050.01416.37
7.3.210.0120.00616.41
7.3.200.0110.00716.32
7.3.190.0090.00616.27
7.3.180.0160.00016.59
7.3.170.0070.01316.29
7.3.160.0060.01716.48
7.3.120.0040.01015.06
7.2.330.0060.01316.61
7.2.320.0170.00716.75
7.2.310.0110.00616.68
7.2.300.0110.00616.77
7.2.290.0100.00616.64
7.2.00.0030.00819.32
7.1.100.0000.01118.34
7.1.70.0050.00217.07
7.1.60.0070.01819.25
7.1.50.0070.00716.72
7.1.00.0030.05022.54
7.0.200.0040.00416.77
7.0.140.0030.07022.12
7.0.120.0030.04022.11
7.0.60.0030.06321.81
7.0.50.0030.08717.90
7.0.40.0200.07720.27
7.0.30.0330.07320.23
7.0.20.0170.04720.16
7.0.10.0030.08720.19
7.0.00.0070.08320.23
5.6.280.0070.07021.11
5.6.210.0070.05320.77
5.6.200.0000.07318.19
5.6.190.0100.05020.73
5.6.180.0370.07020.57
5.6.170.0400.07320.54
5.6.160.0170.07720.46
5.6.150.0100.07718.33
5.6.140.0030.06018.12
5.6.130.0030.09318.24
5.6.120.0070.08721.00
5.6.110.0070.08021.02
5.6.100.0070.08021.13
5.6.90.0100.07021.09
5.6.80.0130.08020.45
5.5.350.0200.07720.45
5.5.340.0030.08317.98
5.5.330.0000.05020.19
5.5.320.0230.03720.36
5.5.310.0230.04020.29
5.5.300.0100.07718.08
5.5.290.0100.08317.95
5.5.280.0130.06720.91
5.5.270.0030.04020.73
5.5.260.0100.03720.85
5.5.250.0130.07720.57
5.5.240.0300.06720.08
5.4.450.0070.08319.57
5.4.440.0000.04719.48
5.4.430.0070.07019.47
5.4.420.0030.08019.57
5.4.410.0070.07719.17
5.4.400.0100.04018.97
5.4.390.0070.08019.16
5.4.380.0070.07019.24
5.4.370.0070.07019.08
5.4.360.0070.07019.12
5.4.350.0130.05719.16
5.4.340.0030.04719.20
5.4.320.0100.07319.02
5.4.310.0100.07019.24
5.4.300.0100.06719.24
5.4.290.0070.05019.08
5.4.280.0030.04019.24
5.4.270.0070.07319.20
5.4.260.0070.03719.11
5.4.250.0100.07019.11
5.4.240.0100.03318.86
5.4.230.0100.05019.14
5.4.220.0000.07019.02
5.4.210.0130.06719.23
5.4.200.0070.07719.09
5.4.190.0130.07018.84
5.4.180.0130.06719.15
5.4.170.0100.07019.01
5.4.160.0000.05319.13
5.4.150.0070.04018.99
5.4.140.0000.04016.45
5.4.130.0030.03316.51
5.4.120.0030.04716.51
5.4.110.0070.03316.59
5.4.100.0000.03716.46
5.4.90.0070.03016.44
5.4.80.0000.03716.44
5.4.70.0030.03716.45
5.4.60.0000.03716.39
5.4.50.0070.04016.46
5.4.40.0030.03316.38
5.4.30.0030.03316.44
5.4.20.0000.03716.49
5.4.10.0030.03716.64
5.4.00.0030.03315.74
5.3.290.0100.07714.64
5.3.280.0070.05014.63
5.3.270.0070.03714.63
5.3.260.0000.04014.66
5.3.250.0000.04014.67
5.3.240.0000.04014.62
5.3.230.0030.04314.60
5.3.220.0070.03314.63
5.3.210.0000.04014.73
5.3.200.0000.04014.46
5.3.190.0030.03714.60
5.3.180.0030.03714.57
5.3.170.0100.03014.72
5.3.160.0070.03314.63
5.3.150.0030.03714.64
5.3.140.0070.03314.49
5.3.130.0030.03714.44
5.3.120.0070.03314.59
5.3.110.0100.03014.59
5.3.100.0000.04013.96
5.3.90.0000.03714.10
5.3.80.0030.03314.08
5.3.70.0000.04014.12
5.3.60.0070.03014.01
5.3.50.0000.03714.13
5.3.40.0000.04013.93
5.3.30.0000.04013.97
5.3.20.0000.03713.73
5.3.10.0000.03713.72
5.3.00.0100.02713.67
5.2.170.0070.02711.10
5.2.160.0000.04311.22
5.2.150.0030.03011.22
5.2.140.0000.03311.21
5.2.130.0070.02311.06
5.2.120.0070.02311.17
5.2.110.0070.02311.07
5.2.100.0030.03011.14
5.2.90.0030.02711.18
5.2.80.0000.03711.06
5.2.70.0030.02711.09
5.2.60.0070.02311.02
5.2.50.0000.03011.05
5.2.40.0030.03010.96
5.2.30.0030.03311.03
5.2.20.0070.02310.96
5.2.10.0070.04311.02
5.2.00.0000.03710.86
5.1.60.0030.0479.97
5.1.50.0070.05010.01
5.1.40.0000.03010.04
5.1.30.0030.02710.35
5.1.20.0070.05310.27
5.1.10.0100.05010.06
5.1.00.0070.05310.03
5.0.50.0030.0438.52
5.0.40.0030.0238.32
5.0.30.0070.0578.19
5.0.20.0070.0378.17
5.0.10.0070.0308.22
5.0.00.0100.0578.18
4.4.90.0000.0137.90
4.4.80.0000.0177.90
4.4.70.0000.0177.90
4.4.60.0000.0177.90
4.4.50.0000.0177.90
4.4.40.0000.0277.90
4.4.30.0000.0277.90
4.4.20.0100.0307.90
4.4.10.0030.0177.90
4.4.00.0000.0307.90
4.3.110.0000.0277.90
4.3.100.0000.0337.90
4.3.90.0030.0337.90
4.3.80.0030.0537.90
4.3.70.0030.0177.90
4.3.60.0000.0377.90
4.3.50.0000.0177.90
4.3.40.0000.0307.90
4.3.30.0030.0337.90
4.3.20.0030.0307.90
4.3.10.0000.0307.90
4.3.00.0070.0307.90

preferences:
64.9 ms | 400 KiB | 5 Q