3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace My\Example\Model { abstract class Super { private $aliases; protected function __construct(array $aliases) { $this->aliases = $aliases; } public function __call($name, $arguments) { echo "Calling virtual method $name...\n"; /* if $name is an alias, replace it */ if (isset($this->aliases[$name])) { $name = $this->aliases[$name]; echo "That's an alias for $name...\n"; } /* throw an exception if the method is undefined */ if (!method_exists($this, $name)) { throw new Exception("The specified method or method alias is undefined in the current context"); } /* finally, call the method by its actual name */ return $this->$name($arguments); } } } namespace My\Example\Model { class Sub extends Super { public function __construct() { parent::__construct(array( "alias" => "actualMethod" )); } public function actualMethod() { echo "Inside the actual method\n"; } } } namespace My\Example { $sub = new Sub; $sub->alias(); }

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.40.0140.00018.88
8.3.30.0110.00419.17
8.3.20.0030.00620.34
8.3.10.0040.00423.41
8.3.00.0070.00022.46
8.2.170.0100.00622.96
8.2.160.0030.01020.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0070.00022.26
8.2.110.0030.00622.27
8.2.100.0080.00417.78
8.2.90.0030.00619.02
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00617.80
8.2.50.0030.00618.07
8.2.40.0040.00418.03
8.2.30.0070.00018.01
8.2.20.0040.00417.59
8.2.10.0090.00019.38
8.2.00.0050.00317.62
8.1.270.0080.00023.96
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0060.00323.87
8.1.230.0080.00419.02
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0040.00417.00
8.1.190.0080.00017.39
8.1.180.0000.00818.10
8.1.170.0050.00318.46
8.1.160.0000.00821.95
8.1.150.0030.00518.43
8.1.140.0040.00417.37
8.1.130.0030.00317.76
8.1.120.0040.00417.24
8.1.110.0000.00817.32
8.1.100.0000.00717.24
8.1.90.0040.00417.33
8.1.80.0040.00417.19
8.1.70.0050.00317.33
8.1.60.0030.00617.42
8.1.50.0000.00817.41
8.1.40.0040.00417.46
8.1.30.0000.00817.60
8.1.20.0020.00517.63
8.1.10.0050.00217.49
8.1.00.0000.00817.49
8.0.300.0070.00018.77
8.0.290.0000.00717.18
8.0.280.0030.00318.43
8.0.270.0050.00217.11
8.0.260.0030.00318.61
8.0.250.0030.00316.85
8.0.240.0070.00016.99
8.0.230.0030.00316.84
8.0.220.0030.00316.77
8.0.210.0070.00016.85
8.0.200.0000.00716.87
8.0.190.0040.00416.84
8.0.180.0060.00616.94
8.0.170.0040.00416.80
8.0.160.0000.00716.90
8.0.150.0050.00316.75
8.0.140.0040.00416.84
8.0.130.0000.00513.32
8.0.120.0040.00416.89
8.0.110.0000.00716.78
8.0.100.0080.00016.95
8.0.90.0040.00416.70
8.0.80.0040.01116.90
8.0.70.0050.00216.95
8.0.60.0040.00416.76
8.0.50.0040.00416.80
8.0.30.0070.01117.13
8.0.20.0120.00617.40
8.0.10.0000.00717.00
8.0.00.0120.00716.54
7.4.330.0050.00015.00
7.4.320.0000.00716.48
7.4.300.0000.00816.39
7.4.290.0030.00716.44
7.4.280.0030.00316.52
7.4.270.0030.00316.46
7.4.260.0000.00716.42
7.4.250.0000.00816.40
7.4.240.0040.00416.43
7.4.230.0070.00016.52
7.4.220.0060.01216.46
7.4.210.0080.00916.54
7.4.200.0040.00416.49
7.4.190.0060.00316.44
7.4.160.0100.00516.53
7.4.150.0130.00417.40
7.4.140.0100.00917.86
7.4.130.0150.00616.53
7.4.120.0140.00316.58
7.4.110.0070.01016.45
7.4.100.0070.01016.44
7.4.90.0070.01016.55
7.4.80.0130.00319.39
7.4.70.0140.00316.24
7.4.60.0030.01316.43
7.4.50.0030.00816.63
7.4.40.0000.01622.77
7.4.30.0060.01016.40
7.4.00.0130.00314.82
7.3.330.0030.00313.35
7.3.320.0050.00013.28
7.3.310.0030.00316.33
7.3.300.0030.00316.23
7.3.290.0090.00916.24
7.3.280.0050.01216.33
7.3.270.0100.00717.40
7.3.260.0100.00616.51
7.3.250.0090.00816.34
7.3.240.0190.00016.25
7.3.230.0100.00616.39
7.3.210.0060.01116.49
7.3.200.0100.01319.39
7.3.190.0150.00716.31
7.3.180.0100.01016.39
7.3.170.0090.01316.35
7.3.160.0070.01016.46
7.3.120.0060.00614.66
7.2.330.0120.00616.70
7.2.320.0160.00016.62
7.2.310.0090.00616.42
7.2.300.0140.00316.58
7.2.290.0060.01016.62
7.2.110.0590.00316.36
7.2.80.0290.00616.24
7.2.60.0030.01016.84
7.2.50.0030.01016.76
7.1.200.0070.00715.39
7.1.70.0070.01016.91
7.1.60.0090.01219.29
7.1.50.0070.01816.86
7.1.00.0030.07722.27
7.0.200.0030.00316.79
7.0.140.0030.07322.08
7.0.60.0130.06719.93
7.0.50.0030.04017.73
7.0.40.0130.08020.23
7.0.30.0230.03720.11
7.0.20.0270.05020.10
7.0.10.0230.06320.43
7.0.00.0030.04020.21
5.6.280.0030.07321.13
5.6.210.0030.08320.70
5.6.200.0070.04318.29
5.6.190.0100.05020.52
5.6.180.0000.04320.61
5.6.170.0270.07720.56
5.6.160.0130.07720.49
5.6.150.0070.04018.30
5.6.140.0030.04018.28
5.6.130.0030.04018.14
5.6.120.0070.08321.11
5.6.110.0130.07020.99
5.6.100.0200.07321.03
5.6.90.0070.08720.95
5.6.80.0070.08020.54
5.6.70.0330.05020.41
5.5.350.0100.07720.45
5.5.340.0100.08017.99
5.5.330.0130.07720.27
5.5.320.0070.05020.38
5.5.310.0200.05320.28
5.5.300.0070.05017.92
5.5.290.0100.08317.98
5.5.280.0070.03720.81
5.5.270.0170.07320.81
5.5.260.0100.08020.69
5.5.250.0170.03320.51
5.5.240.0100.05720.27
5.4.450.0430.04319.47
5.4.440.0830.06019.59
5.4.430.1000.06719.15
5.4.420.0730.05719.30
5.4.410.0530.06019.32
5.4.400.0830.05319.06
5.4.390.0830.06019.14
5.4.380.0170.05018.57
5.4.370.0170.05318.75
5.4.360.0230.05018.54
5.4.350.0200.04718.71
5.4.340.0230.04718.48
5.4.320.0060.03512.51
5.4.310.0040.03912.50
5.4.300.0060.03912.51
5.4.290.0060.04912.51
5.4.280.0060.03412.41
5.4.270.0090.04612.41
5.4.260.0010.04212.41
5.4.250.0050.04112.40
5.4.240.0080.03712.40
5.4.230.0030.03912.40
5.4.220.0160.04812.38
5.4.210.0360.09512.38
5.4.200.0200.05212.38
5.4.190.0180.04312.37
5.4.180.0140.04712.38
5.4.170.0180.04812.39
5.4.160.0200.04512.38
5.4.150.0120.05212.38
5.4.140.0220.04212.05
5.4.130.0120.05412.05
5.4.120.0140.04612.00
5.4.110.0190.04012.00
5.4.100.0210.04512.00
5.4.90.0190.04112.00
5.4.80.0150.04712.00
5.4.70.0170.04311.99
5.4.60.0170.04511.99
5.4.50.0140.04511.99
5.4.40.0090.05211.98
5.4.30.0170.04411.98
5.4.20.0140.04411.98
5.4.10.0150.04311.98
5.4.00.0160.04211.46
5.3.290.0060.03812.80
5.3.280.0050.03712.71
5.3.270.0200.04512.72
5.3.260.0200.04512.72
5.3.250.0150.04812.72
5.3.240.0230.04212.72
5.3.230.0160.04712.71
5.3.220.0240.04012.68
5.3.210.0180.04612.68
5.3.200.0220.04912.68
5.3.190.0210.04512.68
5.3.180.0170.04512.68
5.3.170.0210.04412.67
5.3.160.0130.04812.68
5.3.150.0210.04312.68
5.3.140.0160.04812.66
5.3.130.0190.04212.66
5.3.120.0180.04712.66
5.3.110.0260.07612.66
5.3.100.0180.04812.12
5.3.90.0150.04412.09
5.3.80.0180.04612.08
5.3.70.0200.04612.08
5.3.60.0170.04612.07
5.3.50.0260.03912.01
5.3.40.0120.05012.03
5.3.30.0150.04611.98
5.3.20.0160.04511.76
5.3.10.0150.04511.72
5.3.00.0180.04211.70
5.2.170.0160.0369.16
5.2.160.0140.0369.16
5.2.150.0140.0379.16
5.2.140.0150.0389.16
5.2.130.0120.0419.12
5.2.120.0190.0309.12
5.2.110.0150.0359.13
5.2.100.0180.0319.13
5.2.90.0180.0309.13
5.2.80.0180.0329.11
5.2.70.0140.0369.12
5.2.60.0130.0369.07
5.2.50.0160.0349.04
5.2.40.0140.0369.02
5.2.30.0160.0338.99
5.2.20.0170.0398.98
5.2.10.0190.0398.91
5.2.00.0200.0408.76
5.1.60.0160.0368.05
5.1.50.0110.0348.05
5.1.40.0140.0318.03
5.1.30.0160.0298.37
5.1.20.0130.0368.40
5.1.10.0140.0328.12
5.1.00.0140.0308.12
5.0.50.0110.0266.60
5.0.40.0130.0246.46
5.0.30.0100.0366.27
5.0.20.0160.0216.25
5.0.10.0150.0206.22
5.0.00.0120.0376.21
4.4.90.0130.0134.78
4.4.80.0070.0204.75
4.4.70.0080.0214.75
4.4.60.0070.0194.76
4.4.50.0090.0184.77
4.4.40.0060.0314.71
4.4.30.0110.0184.76
4.4.20.0100.0184.85
4.4.10.0080.0194.85
4.4.00.0100.0274.76
4.3.110.0080.0184.66
4.3.100.0060.0214.67
4.3.90.0060.0194.63
4.3.80.0090.0274.58
4.3.70.0090.0164.63
4.3.60.0120.0134.63
4.3.50.0090.0194.62
4.3.40.0070.0314.54
4.3.30.0060.0183.28
4.3.20.0050.0193.27
4.3.10.0070.0183.23
4.3.00.0030.01713.13

preferences:
64.87 ms | 400 KiB | 5 Q