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 Model\Sub; $sub->aliassss(); }

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.00316.38
8.3.50.0020.01421.89
8.3.40.0000.01518.70
8.3.30.0090.00619.02
8.3.20.0050.00320.30
8.3.10.0030.00523.65
8.3.00.0040.00422.45
8.2.180.0070.00716.63
8.2.170.0070.00722.96
8.2.160.0000.01420.39
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.01426.16
8.2.120.0000.00722.26
8.2.110.0100.00020.53
8.2.100.0070.00717.91
8.2.90.0040.00419.39
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0100.00017.91
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0080.00018.13
8.2.20.0000.00817.66
8.2.10.0030.00619.59
8.2.00.0000.00817.88
8.1.280.0170.00325.92
8.1.270.0050.00323.84
8.1.260.0050.00226.35
8.1.250.0060.00328.09
8.1.240.0060.00323.79
8.1.230.0070.00417.42
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0030.00617.38
8.1.190.0000.00817.43
8.1.180.0000.00818.10
8.1.170.0090.00018.64
8.1.160.0040.00421.94
8.1.150.0000.00718.62
8.1.140.0050.00217.34
8.1.130.0000.00717.88
8.1.120.0050.00217.43
8.1.110.0040.00417.41
8.1.100.0060.00317.44
8.1.90.0050.00317.47
8.1.80.0040.00417.46
8.1.70.0030.00317.31
8.1.60.0060.00317.59
8.1.50.0000.00717.56
8.1.40.0000.00717.51
8.1.30.0030.00517.62
8.1.20.0000.00817.66
8.1.10.0030.00517.57
8.1.00.0040.00417.52
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0040.00418.44
8.0.270.0000.00717.13
8.0.260.0030.00316.92
8.0.250.0030.00317.01
8.0.240.0070.00017.02
8.0.230.0030.00317.01
8.0.220.0070.00016.98
8.0.210.0030.00316.97
8.0.200.0040.00416.96
8.0.190.0000.00816.93
8.0.180.0050.00317.02
8.0.170.0040.00416.88
8.0.160.0080.00016.96
8.0.150.0060.00316.94
8.0.140.0040.00416.91
8.0.130.0000.00613.39
8.0.120.0040.00416.80
8.0.110.0070.00016.86
8.0.100.0050.00316.84
8.0.90.0000.00817.03
8.0.80.0080.01216.84
8.0.70.0070.00016.78
8.0.60.0040.00416.87
8.0.50.0050.00216.83
8.0.30.0120.00717.01
8.0.20.0160.00617.40
8.0.10.0030.00317.06
8.0.00.0150.00516.70
7.4.330.0020.00215.00
7.4.320.0000.00616.46
7.4.300.0040.00416.51
7.4.290.0030.00716.60
7.4.280.0000.00716.60
7.4.270.0000.00716.57
7.4.260.0050.00516.61
7.4.250.0080.00016.54
7.4.240.0050.00216.45
7.4.230.0030.00316.50
7.4.220.0120.00616.46
7.4.210.0070.00816.54
7.4.200.0080.00016.60
7.4.190.0000.00816.51
7.4.160.0100.00616.73
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0140.00716.47
7.4.120.0090.00816.58
7.4.110.0070.01316.50
7.4.100.0100.00616.41
7.4.90.0100.00716.43
7.4.80.0180.00019.39
7.4.70.0060.01016.63
7.4.60.0110.00616.45
7.4.50.0000.00916.55
7.4.40.0040.00822.77
7.4.30.0090.00616.66
7.4.00.0090.00914.96
7.3.330.0030.00313.39
7.3.320.0000.00513.41
7.3.310.0070.00016.34
7.3.300.0070.00016.37
7.3.290.0210.00416.36
7.3.280.0100.00816.43
7.3.270.0090.00917.40
7.3.260.0030.01416.76
7.3.250.0130.00416.63
7.3.240.0080.00816.60
7.3.230.0110.00616.63
7.3.210.0060.01016.66
7.3.200.0110.00519.39
7.3.190.0130.01016.44
7.3.180.0080.00816.42
7.3.170.0060.00916.45
7.3.160.0040.01216.43
7.3.120.0090.00515.04
7.3.110.0070.01114.95
7.3.100.0110.00414.66
7.3.90.0030.01414.81
7.3.80.0030.01415.01
7.3.70.0060.00614.98
7.3.60.0100.00314.64
7.3.50.0150.00014.77
7.3.40.0030.00914.66
7.3.30.0030.01014.99
7.3.20.0110.00416.85
7.3.10.0030.01016.93
7.3.00.0030.01016.65
7.2.330.0100.01416.46
7.2.320.0100.00716.51
7.2.310.0000.02116.84
7.2.300.0160.00616.50
7.2.290.0100.00716.76
7.2.250.0150.00415.16
7.2.240.0130.00714.90
7.2.230.0030.01314.96
7.2.220.0070.00314.77
7.2.210.0120.00415.18
7.2.200.0140.00015.00
7.2.190.0070.00714.92
7.2.180.0060.00915.07
7.2.170.0060.01015.17
7.2.80.0040.00816.43
7.2.60.0070.00717.01
7.2.50.0030.00617.04
7.1.330.0060.00915.96
7.1.320.0030.01015.75
7.1.310.0070.00715.59
7.1.300.0030.01015.89
7.1.290.0110.00415.73
7.1.280.0090.00315.78
7.1.270.0040.01115.48
7.1.260.0080.00815.91
7.1.200.0070.00715.95
7.1.70.0000.01417.32
7.1.60.0110.01519.29
7.1.50.0070.01017.01
7.1.00.0000.08022.54
7.0.200.0000.00816.88
7.0.140.0030.07022.00
7.0.60.0000.07019.84
7.0.50.0100.07717.89
7.0.40.0230.07020.27
7.0.30.0470.05020.23
7.0.20.0270.06020.09
7.0.10.0030.04320.09
7.0.00.0300.06720.08
5.6.280.0070.07321.09
5.6.210.0030.05020.52
5.6.200.0000.04318.13
5.6.190.0100.08320.61
5.6.180.0370.03720.62
5.6.170.0130.04720.53
5.6.160.0000.06020.50
5.6.150.0070.07318.18
5.6.140.0070.05018.20
5.6.130.0070.07018.16
5.6.120.0070.09020.89
5.6.110.0130.07721.00
5.6.100.0070.05720.99
5.6.90.0100.08020.96
5.6.80.0100.07720.54
5.5.350.0270.07720.36
5.5.340.0100.04718.05
5.5.330.0100.08020.34
5.5.320.0270.08020.34
5.5.310.0170.06720.24
5.5.300.0030.06318.04
5.5.290.0070.07318.07
5.5.280.0170.08320.81
5.5.270.0070.05020.94
5.5.260.0100.07320.98
5.5.250.0070.05720.55
5.5.240.0100.08720.38
5.4.450.1300.03719.31
5.4.440.0470.05019.52
5.4.430.1000.03719.32
5.4.420.0770.04319.53
5.4.410.0370.03719.25
5.4.400.0600.04018.95
5.4.390.0330.04719.26
5.4.380.0370.07018.63
5.4.370.0270.05718.59
5.4.360.0430.05318.61
5.4.350.0400.05018.75
5.4.340.0370.05018.61
5.4.320.0080.03612.52
5.4.310.0080.04112.51
5.4.300.0090.04112.51
5.4.290.0060.04112.51
5.4.280.0080.04012.41
5.4.270.0080.03412.41
5.4.260.0070.04012.41
5.4.250.0060.03712.41
5.4.240.0070.04312.41
5.4.230.0060.04012.40
5.4.220.0120.04812.39
5.4.210.0220.04312.39
5.4.200.0170.04612.39
5.4.190.0200.04412.39
5.4.180.0200.04112.39
5.4.170.0270.04412.39
5.4.160.0210.04512.39
5.4.150.0210.04512.38
5.4.140.0410.08512.07
5.4.130.0220.04412.05
5.4.120.0130.04912.01
5.4.110.0360.08712.01
5.4.100.0220.03912.01
5.4.90.0190.04212.00
5.4.80.0160.04612.00
5.4.70.0220.04012.00
5.4.60.0180.04112.00
5.4.50.0230.03812.00
5.4.40.0230.04311.98
5.4.30.0160.04711.98
5.4.20.0180.04211.99
5.4.10.0140.04511.98
5.4.00.0180.04411.48
5.3.290.0070.04212.80
5.3.280.0060.04012.71
5.3.270.0190.04512.72
5.3.260.0180.04612.72
5.3.250.0150.05112.72
5.3.240.0230.04312.72
5.3.230.0190.04812.71
5.3.220.0190.04412.68
5.3.210.0190.04712.68
5.3.200.0440.08112.68
5.3.190.0210.04512.68
5.3.180.0190.04412.68
5.3.170.0140.04812.67
5.3.160.0240.04012.68
5.3.150.0160.04812.67
5.3.140.0190.04412.66
5.3.130.0210.04812.66
5.3.120.0180.04612.66
5.3.110.0220.04112.66
5.3.100.0190.04712.13
5.3.90.0220.04112.11
5.3.80.0200.04412.10
5.3.70.0200.04512.10
5.3.60.0200.04312.09
5.3.50.0210.04512.03
5.3.40.0120.05212.03
5.3.30.0140.04712.00
5.3.20.0170.04511.77
5.3.10.0170.04311.76
5.3.00.0210.04211.72
5.2.170.0130.0389.16
5.2.160.0200.0329.16
5.2.150.0170.0349.16
5.2.140.0200.0399.15
5.2.130.0270.0589.12
5.2.120.0150.0379.12
5.2.110.0140.0369.13
5.2.100.0170.0329.13
5.2.90.0210.0299.13
5.2.80.0140.0359.11
5.2.70.0150.0359.11
5.2.60.0170.0349.07
5.2.50.0170.0359.04
5.2.40.0130.0359.01
5.2.30.0110.0388.98
5.2.20.0160.0348.98
5.2.10.0200.0358.90
5.2.00.0150.0318.76
5.1.60.0200.0508.05
5.1.50.0130.0298.04
5.1.40.0120.0288.04
5.1.30.0110.0358.37
5.1.20.0150.0318.40
5.1.10.0120.0318.13
5.1.00.0150.0278.12
5.0.50.0120.0226.60
5.0.40.0110.0236.46
5.0.30.0070.0396.27
5.0.20.0140.0226.24
5.0.10.0130.0266.22
5.0.00.0130.0336.21
4.4.90.0110.0154.78
4.4.80.0080.0184.75
4.4.70.0090.0184.75
4.4.60.0060.0214.76
4.4.50.0090.0194.77
4.4.40.0050.0314.71
4.4.30.0070.0194.76
4.4.20.0080.0194.84
4.4.10.0110.0154.85
4.4.00.0120.0294.75
4.3.110.0080.0194.67
4.3.100.0110.0164.66
4.3.90.0130.0164.64
4.3.80.0150.0244.58
4.3.70.0080.0234.63
4.3.60.0110.0164.63
4.3.50.0120.0184.63
4.3.40.0070.0304.54
4.3.30.0080.0183.28
4.3.20.0060.0213.27
4.3.10.0090.0173.23
4.3.00.0100.01313.13

preferences:
37.92 ms | 401 KiB | 5 Q