3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace My\Example { 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); } } 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.60.0070.00716.88
8.3.50.0060.00922.13
8.3.40.0040.01118.79
8.3.30.0110.00419.21
8.3.20.0080.00020.34
8.3.10.0080.00023.52
8.3.00.0040.00422.46
8.2.180.0160.00016.38
8.2.170.0060.00922.96
8.2.160.0070.01320.37
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0050.00326.16
8.2.120.0070.00022.16
8.2.110.0030.00720.35
8.2.100.0040.00817.91
8.2.90.0050.00318.09
8.2.80.0040.00418.05
8.2.70.0030.00617.63
8.2.60.0030.00618.03
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0000.00818.03
8.2.20.0040.00417.65
8.2.10.0030.00519.58
8.2.00.0040.00417.71
8.1.280.0100.01025.92
8.1.270.0030.00623.91
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00022.06
8.1.230.0130.00020.81
8.1.220.0090.00017.74
8.1.210.0050.00318.88
8.1.200.0060.00317.48
8.1.190.0040.00417.53
8.1.180.0030.00518.10
8.1.170.0090.00018.50
8.1.160.0080.00022.06
8.1.150.0040.00418.57
8.1.140.0000.00717.50
8.1.130.0030.00317.77
8.1.120.0000.00817.44
8.1.110.0000.00717.33
8.1.100.0030.00417.36
8.1.90.0040.00417.47
8.1.80.0080.00017.46
8.1.70.0000.00717.41
8.1.60.0050.00317.61
8.1.50.0000.00817.41
8.1.40.0000.00817.48
8.1.30.0030.00517.63
8.1.20.0080.00017.64
8.1.10.0060.00317.55
8.1.00.0050.00317.42
8.0.300.0070.00020.00
8.0.290.0000.00717.18
8.0.280.0070.00018.51
8.0.270.0000.00717.26
8.0.260.0000.00718.52
8.0.250.0070.00016.86
8.0.240.0000.00816.86
8.0.230.0070.00016.88
8.0.220.0030.00316.85
8.0.210.0000.00716.91
8.0.200.0030.00316.99
8.0.190.0040.00416.89
8.0.180.0030.00616.92
8.0.170.0040.00416.79
8.0.160.0030.00316.85
8.0.150.0030.00316.77
8.0.140.0040.00416.87
8.0.130.0000.00513.31
8.0.120.0040.00416.84
8.0.110.0040.00416.92
8.0.100.0040.00416.96
8.0.90.0060.00316.89
8.0.80.0070.01416.87
8.0.70.0040.00416.70
8.0.60.0040.00416.95
8.0.50.0070.00016.95
8.0.30.0100.00917.03
8.0.20.0120.01017.44
8.0.10.0040.00417.06
8.0.00.0100.01216.65
7.4.330.0000.00615.20
7.4.320.0060.00016.60
7.4.300.0040.00416.52
7.4.290.0030.00616.47
7.4.280.0000.00716.40
7.4.270.0000.00716.50
7.4.260.0040.00316.35
7.4.250.0000.00716.57
7.4.240.0000.00716.55
7.4.230.0070.00016.68
7.4.220.0060.01216.46
7.4.210.0090.00816.52
7.4.200.0070.00016.60
7.4.190.0000.00816.31
7.4.160.0130.00716.62
7.4.150.0090.01217.40
7.4.140.0130.00517.86
7.4.130.0100.00916.52
7.4.120.0070.01116.60
7.4.110.0130.00316.58
7.4.100.0110.00616.50
7.4.90.0060.00916.43
7.4.80.0060.01119.39
7.4.70.0100.00716.50
7.4.60.0060.01116.50
7.4.50.0090.00016.40
7.4.40.0050.00822.77
7.4.30.0060.01016.63
7.4.00.0120.00315.09
7.3.330.0060.00013.14
7.3.320.0050.00013.25
7.3.310.0070.00016.32
7.3.300.0070.00016.21
7.3.290.0050.01016.43
7.3.280.0060.01116.35
7.3.270.0140.00317.40
7.3.260.0120.00616.29
7.3.250.0120.00416.57
7.3.240.0070.01116.64
7.3.230.0140.00316.62
7.3.210.0030.01416.38
7.3.200.0070.01419.39
7.3.190.0090.01216.51
7.3.180.0100.01016.38
7.3.170.0060.00916.39
7.3.160.0110.00616.41
7.3.120.0030.01414.97
7.2.330.0120.00616.37
7.2.320.0160.00816.86
7.2.310.0060.01516.70
7.2.300.0240.01316.45
7.2.290.0170.00016.77
7.2.00.0040.00819.38
7.1.100.0040.00417.84
7.1.70.0040.01217.12
7.1.60.0060.01619.29
7.1.50.0140.01016.94
7.1.00.0070.07322.33
7.0.200.0040.00416.87
7.0.140.0100.06722.05
7.0.60.0030.08320.01
7.0.50.0070.06317.92
7.0.40.0130.08320.18
7.0.30.0230.06720.10
7.0.20.0300.06720.24
7.0.10.0300.07020.06
7.0.00.0070.05720.20
5.6.210.0070.08320.59
5.6.200.0130.06718.19
5.6.190.0100.06720.67
5.6.180.0230.07720.49
5.6.170.0300.03720.71
5.6.160.0030.07020.54
5.6.150.0100.07018.19
5.6.140.0070.05318.15
5.6.130.0100.04318.17
5.6.120.0070.04021.15
5.6.110.0030.06020.95
5.6.100.0030.04721.06
5.6.90.0030.07020.96
5.6.80.0070.03720.52
5.6.70.0300.07020.37
5.5.350.0100.07320.38
5.5.340.0030.04017.96
5.5.330.0070.07720.31
5.5.320.0070.08320.21
5.5.310.0170.05720.26
5.5.300.0070.05017.92
5.5.290.0070.03718.02
5.5.280.0070.05720.98
5.5.270.0170.07020.78
5.5.260.0100.07320.78
5.5.250.0100.06020.62
5.5.240.0030.05320.20
5.4.450.0200.04019.40
5.4.440.0130.04319.19
5.4.430.0270.03319.30
5.4.420.0300.07019.55
5.4.410.0230.04719.16
5.4.400.0270.06019.15
5.4.390.0270.07019.06
5.4.380.0200.05019.14
5.4.370.0470.03019.06
5.4.360.0200.06719.31
5.4.350.0270.06319.16
5.4.340.0300.03019.16
5.4.320.0230.03719.16
5.4.310.0270.07319.09
5.4.300.0330.04019.01
5.4.290.0230.07319.12
5.4.280.0170.04719.31
5.4.270.0230.03719.22
5.4.260.0200.04318.84
5.4.250.0170.03719.23
5.4.240.0230.06018.86
5.4.230.0230.03318.97
5.4.220.0130.06319.11
5.4.210.0200.04319.23
5.4.200.0200.03719.22
5.4.190.0270.07019.14
5.4.180.0270.05019.20
5.4.170.0300.06318.96
5.4.160.0230.06319.10
5.4.150.0330.04019.12
5.4.140.0370.06016.55
5.4.130.0230.06716.38
5.4.120.0200.05016.38
5.4.110.0200.05316.24
5.4.100.0300.07016.52
5.4.90.0170.04016.50
5.4.80.0230.03716.40
5.4.70.0230.03316.58
5.4.60.0330.03316.38
5.4.50.0270.06016.42
5.4.40.0300.05716.45
5.4.30.0200.03716.48
5.4.20.0230.03016.38
5.4.10.0270.06716.27
5.4.00.0200.03716.01
5.3.290.0200.06014.90
5.3.280.0270.03714.62
5.3.270.0230.07314.69
5.3.260.0270.06014.59
5.3.250.0200.05014.52
5.3.240.0300.07014.62
5.3.230.0300.06014.60
5.3.220.0370.07314.48
5.3.210.0300.07014.48
5.3.200.0270.07014.50
5.3.190.0400.04014.55
5.3.180.0270.03014.49
5.3.170.0330.06314.48
5.3.160.0330.06314.59
5.3.150.0230.03714.65
5.3.140.0230.03314.54
5.3.130.0170.04014.47
5.3.120.0230.07314.57
5.3.110.0230.03314.71
5.3.100.0170.03714.04
5.3.90.0170.03314.02
5.3.80.0200.03014.26
5.3.70.0130.04014.04
5.3.60.0230.02713.92
5.3.50.0200.03014.01
5.3.40.0130.04313.87
5.3.30.0100.04014.00
5.3.20.0100.04713.93
5.3.10.0200.03313.58
5.3.00.0170.03313.63
5.2.170.0170.03012.15
5.2.160.0130.02712.15
5.2.150.0130.03012.15
5.2.140.0130.03012.15
5.2.130.0170.02712.15
5.2.120.0100.03012.15
5.2.110.0100.03012.15
5.2.100.0170.02312.15
5.2.90.0200.02012.15
5.2.80.0130.03012.15
5.2.70.0100.03312.15
5.2.60.0130.04012.15
5.2.50.0070.03712.15
5.2.40.0130.02712.15
5.2.30.0200.02712.15
5.2.20.0100.03012.15
5.2.10.0130.03012.15
5.2.00.0100.03312.15
5.1.60.0130.02012.15
5.1.50.0100.02312.15
5.1.40.0100.02312.15
5.1.30.0070.03012.15
5.1.20.0130.02312.15
5.1.10.0070.03012.15
5.1.00.0200.02012.15
5.0.50.0030.02312.15
5.0.40.0070.01712.15
5.0.30.0070.02712.15
5.0.20.0070.01712.15
5.0.10.0030.02012.15
5.0.00.0070.03012.15
4.4.90.0100.01312.15
4.4.80.0030.01712.15
4.4.70.0030.01712.15
4.4.60.0070.01312.15
4.4.50.0070.01312.15
4.4.40.0030.02712.15
4.4.30.0030.02012.15
4.4.20.0030.01712.15
4.4.10.0070.01312.15
4.4.00.0000.03012.15
4.3.110.0030.01712.15
4.3.100.0030.01712.15
4.3.90.0030.01712.15
4.3.80.0100.02012.15
4.3.70.0030.01712.15
4.3.60.0030.01712.15
4.3.50.0000.02012.15
4.3.40.0030.02712.15
4.3.30.0000.01712.15
4.3.20.0000.01712.15
4.3.10.0000.01712.15
4.3.00.0030.01712.15

preferences:
44.84 ms | 401 KiB | 5 Q