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->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.60.0120.00316.59
8.3.50.0130.00522.05
8.3.40.0120.00318.83
8.3.30.0070.00719.27
8.3.20.0040.00420.21
8.3.10.0040.00423.66
8.3.00.0040.00422.45
8.2.180.0000.01516.50
8.2.170.0120.00922.96
8.2.160.0030.01720.38
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0100.00726.16
8.2.120.0070.00022.16
8.2.110.0090.00020.21
8.2.100.0030.00917.73
8.2.90.0060.00319.14
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0030.00917.90
8.2.50.0040.00418.07
8.2.40.0030.00518.34
8.2.30.0030.00518.16
8.2.20.0050.00217.64
8.2.10.0040.00417.65
8.2.00.0040.00417.79
8.1.280.0140.00725.92
8.1.270.0040.00423.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.91
8.1.230.0000.01117.64
8.1.220.0030.00517.78
8.1.210.0060.00318.77
8.1.200.0030.00717.47
8.1.190.0000.00817.53
8.1.180.0000.00818.10
8.1.170.0030.00518.70
8.1.160.0000.00722.02
8.1.150.0040.00418.60
8.1.140.0040.00417.43
8.1.130.0000.00717.82
8.1.120.0040.00417.48
8.1.110.0000.00817.34
8.1.100.0000.00717.38
8.1.90.0000.00817.49
8.1.80.0070.00017.47
8.1.70.0000.00717.43
8.1.60.0040.00417.60
8.1.50.0040.00417.43
8.1.40.0040.00417.41
8.1.30.0030.00617.50
8.1.20.0000.00717.65
8.1.10.0000.00717.46
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.32
8.0.270.0070.00017.25
8.0.260.0000.00718.56
8.0.250.0030.00316.92
8.0.240.0000.00816.98
8.0.230.0070.00016.95
8.0.220.0030.00516.88
8.0.210.0070.00016.89
8.0.200.0070.00016.96
8.0.190.0080.00016.94
8.0.180.0110.00016.97
8.0.170.0090.00016.95
8.0.160.0000.00716.93
8.0.150.0000.00716.80
8.0.140.0050.00216.76
8.0.130.0050.00013.28
8.0.120.0000.00816.89
8.0.110.0000.00816.91
8.0.100.0000.00716.93
8.0.90.0080.00017.02
8.0.80.0070.01616.93
8.0.70.0040.00416.93
8.0.60.0000.00716.89
8.0.50.0040.00416.75
8.0.30.0110.00717.17
8.0.20.0090.00917.40
8.0.10.0050.00316.82
8.0.00.0140.00616.89
7.4.330.0030.00315.13
7.4.320.0000.00616.52
7.4.300.0030.00616.62
7.4.290.0030.00616.59
7.4.280.0070.00016.59
7.4.270.0070.00016.52
7.4.260.0030.00616.49
7.4.250.0000.00716.45
7.4.240.0040.00416.54
7.4.230.0030.00316.34
7.4.220.0030.01416.51
7.4.210.0100.00616.55
7.4.200.0070.00016.35
7.4.190.0050.00316.71
7.4.160.0080.01216.68
7.4.150.0140.00317.40
7.4.140.0150.00317.86
7.4.130.0080.01216.40
7.4.120.0090.01116.50
7.4.110.0160.00016.57
7.4.100.0130.00316.45
7.4.90.0070.01016.58
7.4.80.0120.00319.39
7.4.70.0080.00816.54
7.4.60.0080.00816.34
7.4.50.0060.00316.16
7.4.40.0160.00022.77
7.4.30.0110.00716.61
7.4.00.0100.00714.59
7.3.330.0060.00013.18
7.3.320.0020.00313.25
7.3.310.0030.00316.30
7.3.300.0000.00716.30
7.3.290.0160.00416.38
7.3.280.0130.00616.41
7.3.270.0090.00917.40
7.3.260.0070.01016.48
7.3.250.0110.00716.51
7.3.240.0100.00716.39
7.3.230.0140.00316.39
7.3.210.0100.00716.64
7.3.200.0130.00319.39
7.3.190.0100.01016.70
7.3.180.0040.01116.37
7.3.170.0030.01216.39
7.3.160.0080.00816.59
7.3.120.0060.00915.05
7.2.330.0090.00916.46
7.2.320.0120.01316.68
7.2.310.0060.00916.80
7.2.300.0070.01016.63
7.2.290.0030.01316.43
7.2.00.0040.00419.46
7.1.100.0070.00418.23
7.1.70.0030.00516.93
7.1.60.0100.01619.29
7.1.50.0070.01316.89
7.1.00.0030.07322.43
7.0.200.0040.00416.95
7.0.140.0030.07021.90
7.0.60.0130.07319.88
7.0.50.0030.04017.96
7.0.40.0130.07020.31
7.0.30.0200.04320.26
7.0.20.0270.06320.07
7.0.10.0270.06020.32
7.0.00.0070.03720.05
5.6.280.0030.07320.84
5.6.210.0070.08020.49
5.6.200.0100.07718.25
5.6.190.0030.05720.61
5.6.180.0070.03720.46
5.6.170.0230.08320.49
5.6.160.0130.03720.46
5.6.150.0130.07318.29
5.6.140.0070.07718.18
5.6.130.0100.08318.28
5.6.120.0100.05021.00
5.6.110.0130.08021.15
5.6.100.0130.08021.14
5.6.90.0000.07020.86
5.6.80.0130.07720.52
5.6.70.0230.08020.39
5.5.350.0000.08320.39
5.5.340.0130.07318.05
5.5.330.0130.08020.25
5.5.320.0030.04720.35
5.5.310.0270.05720.27
5.5.300.0000.06017.94
5.5.290.0030.08318.07
5.5.280.0070.09020.86
5.5.270.0070.08320.86
5.5.260.0030.05020.78
5.5.250.0070.06020.62
5.5.240.0000.08320.29
5.4.450.0930.05019.41
5.4.440.0730.06319.48
5.4.430.0800.05719.38
5.4.420.0900.05019.63
5.4.410.0270.05719.45
5.4.400.0800.06019.01
5.4.390.0500.05718.98
5.4.380.0170.05018.79
5.4.370.0170.05318.75
5.4.360.0170.07318.75
5.4.350.0230.04718.51
5.4.340.0170.05018.59
5.4.320.0060.03612.52
5.4.310.0080.04412.50
5.4.300.0060.03612.51
5.4.290.0060.04012.51
5.4.280.0080.03212.41
5.4.270.0110.04512.41
5.4.260.0060.04912.40
5.4.250.0040.03912.41
5.4.240.0060.03512.41
5.4.230.0060.04712.40
5.4.220.0140.05112.38
5.4.210.0200.04412.38
5.4.200.0360.08712.38
5.4.190.0200.04512.38
5.4.180.0160.04812.37
5.4.170.0220.05412.39
5.4.160.0210.04212.38
5.4.150.0180.04812.38
5.4.140.0240.04412.06
5.4.130.0220.04412.05
5.4.120.0210.04412.01
5.4.110.0170.04212.00
5.4.100.0190.04712.00
5.4.90.0200.04211.99
5.4.80.0150.04912.00
5.4.70.0160.04511.99
5.4.60.0180.04412.00
5.4.50.0170.04611.99
5.4.40.0160.04711.98
5.4.30.0170.04311.98
5.4.20.0180.04411.98
5.4.10.0190.05311.97
5.4.00.0180.04111.46
5.3.290.0040.04112.80
5.3.280.0080.03812.71
5.3.270.0200.05012.73
5.3.260.0180.04712.72
5.3.250.0260.04112.72
5.3.240.0210.04512.72
5.3.230.0170.05112.71
5.3.220.0170.05012.68
5.3.210.0160.05012.68
5.3.200.0210.04712.68
5.3.190.0190.04812.67
5.3.180.0200.04612.67
5.3.170.0230.04712.67
5.3.160.0210.04212.67
5.3.150.0140.05312.68
5.3.140.0170.04712.66
5.3.130.0180.04912.66
5.3.120.0240.04412.66
5.3.110.0210.04512.66
5.3.100.0260.04312.12
5.3.90.0210.04512.09
5.3.80.0150.05412.08
5.3.70.0220.04412.08
5.3.60.0240.05012.06
5.3.50.0230.04612.01
5.3.40.0170.05412.01
5.3.30.0220.04111.98
5.3.20.0190.04611.75
5.3.10.0210.03711.72
5.3.00.0150.04811.70
5.2.170.0190.0359.16
5.2.160.0110.0409.16
5.2.150.0210.0349.16
5.2.140.0210.0319.16
5.2.130.0170.0369.12
5.2.120.0170.0349.12
5.2.110.0210.0439.12
5.2.100.0180.0349.12
5.2.90.0190.0329.13
5.2.80.0160.0339.11
5.2.70.0180.0369.11
5.2.60.0180.0319.07
5.2.50.0120.0439.04
5.2.40.0130.0379.01
5.2.30.0180.0378.98
5.2.20.0200.0348.98
5.2.10.0150.0378.90
5.2.00.0290.0908.75
5.1.60.0110.0368.05
5.1.50.0130.0378.05
5.1.40.0150.0308.04
5.1.30.0230.0268.38
5.1.20.0160.0408.40
5.1.10.0150.0368.13
5.1.00.0280.0808.12
5.0.50.0130.0306.61
5.0.40.0150.0246.45
5.0.30.0390.0716.27
5.0.20.0090.0286.24
5.0.10.0080.0276.22
5.0.00.0400.0766.21
4.4.90.0210.0344.78
4.4.80.0100.0254.75
4.4.70.0100.0214.75
4.4.60.0120.0214.75
4.4.50.0150.0194.77
4.4.40.0170.0874.71
4.4.30.0090.0184.76
4.4.20.0100.0184.84
4.4.10.0100.0204.85
4.4.00.0110.0294.76
4.3.110.0090.0234.67
4.3.100.0110.0174.67
4.3.90.0100.0214.64
4.3.80.0090.0314.59
4.3.70.0120.0164.63
4.3.60.0300.0604.63
4.3.50.0080.0194.63
4.3.40.0070.0304.54
4.3.30.0060.0183.29
4.3.20.0040.0203.27
4.3.10.0050.0193.23
4.3.00.0200.01713.13

preferences:
39.89 ms | 401 KiB | 5 Q