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.0070.01318.43
8.3.50.0120.00721.33
8.3.40.0070.00718.97
8.3.30.0070.00720.30
8.3.20.0060.00320.53
8.3.10.0000.00821.01
8.3.00.0040.00422.52
8.2.180.0110.00416.88
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00021.09
8.2.110.0000.00821.98
8.2.100.0040.00717.84
8.2.90.0050.00319.19
8.2.80.0040.00419.09
8.2.70.0090.00017.75
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0050.00318.34
8.2.30.0040.00419.47
8.2.20.0040.00417.65
8.2.10.0040.00417.71
8.2.00.0070.00417.79
8.1.280.0090.00625.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00022.53
8.1.230.0100.00020.97
8.1.220.0030.00518.77
8.1.210.0080.00018.91
8.1.200.0090.00017.35
8.1.190.0030.00617.53
8.1.180.0000.00818.10
8.1.170.0080.00018.50
8.1.160.0040.00418.80
8.1.150.0050.00218.63
8.1.140.0050.00217.45
8.1.130.0040.00417.44
8.1.120.0030.00317.35
8.1.110.0040.00417.34
8.1.100.0000.00717.34
8.1.90.0070.00017.39
8.1.80.0040.00417.45
8.1.70.0030.00517.38
8.1.60.0040.00417.46
8.1.50.0050.00317.52
8.1.40.0000.01017.54
8.1.30.0000.00817.54
8.1.20.0030.00617.61
8.1.10.0000.00817.60
8.1.00.0040.00417.44
8.0.300.0000.00919.98
8.0.290.0070.00017.04
8.0.280.0000.00718.40
8.0.270.0050.00317.25
8.0.260.0030.00316.87
8.0.250.0070.00017.07
8.0.240.0030.00617.02
8.0.230.0030.00317.06
8.0.220.0030.00316.97
8.0.210.0000.00716.98
8.0.200.0000.00716.98
8.0.190.0030.00516.97
8.0.180.0000.00716.84
8.0.170.0050.00316.93
8.0.160.0040.00416.94
8.0.150.0000.00816.86
8.0.140.0040.00416.93
8.0.130.0030.00313.43
8.0.120.0020.00516.92
8.0.110.0070.00016.85
8.0.100.0080.00017.00
8.0.90.0040.00416.93
8.0.80.0040.01216.88
8.0.70.0040.00416.79
8.0.60.0070.00017.02
8.0.50.0040.00416.80
8.0.30.0080.01316.94
8.0.20.0080.01117.40
8.0.10.0040.00416.96
8.0.00.0110.01116.73
7.4.330.0000.00516.70
7.4.320.0030.00316.52
7.4.300.0060.00016.59
7.4.290.0000.00716.55
7.4.280.0040.00416.50
7.4.270.0050.00216.52
7.4.260.0040.00413.30
7.4.250.0000.00716.57
7.4.240.0030.00316.56
7.4.230.0080.00016.39
7.4.220.0090.00916.61
7.4.210.0100.00616.58
7.4.200.0030.00316.32
7.4.190.0020.00516.75
7.4.160.0080.00816.57
7.4.150.0150.00317.40
7.4.140.0100.00717.86
7.4.130.0060.01116.42
7.4.120.0070.01116.55
7.4.110.0110.00616.64
7.4.100.0110.00516.62
7.4.90.0100.01016.55
7.4.80.0040.01319.39
7.4.70.0100.00716.43
7.4.60.0090.00916.44
7.4.50.0030.00616.29
7.4.40.0080.00622.77
7.4.30.0120.00616.54
7.4.00.0040.01415.10
7.3.330.0000.00613.38
7.3.320.0000.00513.43
7.3.310.0040.00416.46
7.3.300.0030.00316.36
7.3.290.0100.00616.46
7.3.280.0060.00916.42
7.3.270.0060.01217.40
7.3.260.0130.00818.24
7.3.250.0140.00816.46
7.3.240.0080.00816.63
7.3.230.0090.00916.46
7.3.210.0070.01016.52
7.3.200.0070.01419.39
7.3.190.0100.01116.41
7.3.180.0120.00316.41
7.3.170.0150.00716.48
7.3.160.0090.01216.57
7.3.120.0070.01014.99
7.3.110.0120.00614.98
7.3.100.0130.00314.83
7.3.90.0100.00314.88
7.3.80.0060.00915.21
7.3.70.0080.00814.61
7.3.60.0000.01414.96
7.3.50.0070.00715.03
7.3.40.0070.00714.74
7.3.30.0070.01414.65
7.3.20.0050.00516.61
7.3.10.0090.00516.57
7.3.00.0070.00716.80
7.2.330.0150.01416.76
7.2.320.0150.00916.74
7.2.310.0070.01016.75
7.2.300.0000.01516.59
7.2.290.0000.01916.73
7.2.250.0070.01415.18
7.2.240.0070.01315.18
7.2.230.0040.01514.64
7.2.220.0040.01115.15
7.2.210.0030.01614.85
7.2.200.0000.01515.23
7.2.190.0080.00414.97
7.2.180.0030.01315.08
7.2.170.0160.00015.12
7.2.130.0000.01116.95
7.2.120.0090.00616.93
7.2.110.0070.00716.96
7.2.100.0040.00816.82
7.2.90.0070.01017.05
7.2.80.0100.00216.58
7.2.70.0070.00716.79
7.2.60.0070.00716.73
7.2.50.0000.01216.68
7.2.40.0080.01216.95
7.2.30.0110.00616.93
7.2.20.0130.00316.93
7.2.10.0120.00917.00
7.2.00.0080.00618.28
7.1.330.0100.00315.84
7.1.320.0060.00315.73
7.1.310.0000.01115.77
7.1.300.0000.01015.45
7.1.290.0060.00915.65
7.1.280.0040.00815.77
7.1.270.0070.01415.53
7.1.260.0030.01015.79
7.1.250.0090.00616.00
7.1.200.0100.00315.80
7.1.100.0040.00818.04
7.1.70.0030.01017.14
7.1.60.0060.00919.17
7.1.50.0070.01716.75
7.1.00.0000.06022.40
7.0.200.0030.00616.76
7.0.140.0130.06322.00
7.0.80.0030.03719.99
7.0.70.0130.03020.00
7.0.60.0030.08319.98
7.0.50.0100.03320.37
7.0.40.0030.06319.96
7.0.30.0000.08020.04
7.0.20.0070.07020.07
7.0.10.0070.07020.13
7.0.00.0030.04320.13
5.6.280.0000.07020.93
5.6.230.0070.08320.58
5.6.220.0130.06320.68
5.6.210.0030.04020.76
5.6.200.0270.05721.05
5.6.190.0070.03721.06
5.6.180.0000.04720.96
5.6.170.0030.03721.04
5.6.160.0100.03721.06
5.6.150.0100.03721.09
5.6.140.0100.03321.08
5.6.130.0030.04721.09
5.6.120.0070.04021.12
5.6.110.0070.08021.04
5.6.100.0100.07321.02
5.6.90.0030.08321.04
5.6.80.0070.07320.48
5.6.70.0070.03720.43
5.6.60.0070.06720.39
5.6.50.0070.07320.32
5.6.40.0100.07720.36
5.6.30.0100.07320.48
5.6.20.0130.07020.36
5.6.10.0000.07320.44
5.6.00.0000.04320.49
5.5.370.0070.03720.34
5.5.360.0030.08320.41
5.5.350.0170.07320.35
5.5.340.0030.08020.94
5.5.330.0000.04020.79
5.5.320.0100.07020.85
5.5.310.0070.07020.77
5.5.300.0030.03720.88
5.5.290.0170.07320.80
5.5.280.0100.05320.84
5.5.270.0070.08020.78
5.5.260.0070.04020.88
5.5.250.0070.08020.72
5.5.240.0070.04020.32
5.5.230.0100.07320.12
5.5.220.0100.07720.31
5.5.210.0100.04320.25
5.5.200.0030.05720.18
5.5.190.0030.04320.12
5.5.180.0000.04320.16
5.5.160.0100.04020.08
5.5.150.0030.04020.14
5.5.140.0100.03320.16
5.5.130.0030.04020.14
5.5.120.0030.04020.28
5.5.110.0030.04020.20
5.5.100.0130.03020.11
5.5.90.0030.04019.96
5.5.80.0100.03320.08
5.5.70.0030.04020.16
5.5.60.0030.03720.13
5.5.50.0030.03720.01
5.5.40.0070.03720.10
5.5.30.0030.04020.05
5.5.20.0100.03320.00
5.5.10.0000.04020.12
5.5.00.0030.04020.04
5.4.450.0070.03719.36
5.4.440.0000.04319.36
5.4.430.0000.04019.45
5.4.420.0030.04019.48
5.4.410.0000.08019.32
5.4.400.0030.03719.18
5.4.390.0030.04018.88
5.4.380.0070.07018.88
5.4.370.0000.07019.11
5.4.360.0030.08319.23
5.4.350.0030.03719.23
5.4.340.0070.03318.91
5.4.320.0030.07719.20
5.4.310.0000.04019.03
5.4.300.0200.01719.07
5.4.290.0030.03719.04
5.4.280.0000.04019.04
5.4.270.0070.03318.90
5.4.260.0030.03719.02
5.4.250.0000.04018.93
5.4.240.0030.03719.11
5.4.230.0030.03719.16
5.4.220.0030.04019.04
5.4.210.0030.03719.04
5.4.200.0000.04019.16
5.4.190.0030.03719.09
5.4.180.0070.03018.89
5.4.170.0070.04719.17
5.4.160.0030.03719.14
5.4.150.0000.03719.02
5.4.140.0000.04016.51
5.4.130.0070.03016.24
5.4.120.0000.03716.49
5.4.110.0030.03716.56
5.4.100.0070.03316.56
5.4.90.0000.03716.42
5.4.80.0000.03316.55
5.4.70.0100.02716.40
5.4.60.0030.03716.32
5.4.50.0000.03716.33
5.4.40.0000.04016.54
5.4.30.0000.03316.39
5.4.20.0070.03316.36
5.4.10.0130.02316.32
5.4.00.0100.02015.77
5.3.290.0030.03714.71
5.3.280.0030.03714.67
5.3.270.0030.07014.59
5.3.260.0030.04014.59
5.3.250.0030.03714.62
5.3.240.0100.03014.64
5.3.230.0030.03714.59
5.3.220.0070.03314.60
5.3.210.0000.03314.63
5.3.200.0070.03014.55
5.3.190.0000.04314.56
5.3.180.0030.03314.70
5.3.170.0030.03714.50
5.3.160.0000.04014.70
5.3.150.0000.04014.50
5.3.140.0030.03714.68
5.3.130.0000.03314.61
5.3.120.0030.03714.53
5.3.110.0030.03714.52
5.3.100.0000.03314.03
5.3.90.0000.03314.15
5.3.80.0070.03314.16
5.3.70.0070.03314.16
5.3.60.0000.04014.07
5.3.50.0070.03314.02
5.3.40.0070.03313.85
5.3.30.0100.02714.05
5.3.20.0000.04013.59
5.3.10.0030.04313.61
5.3.00.0070.02713.74
5.2.170.0000.02712.34
5.2.160.0000.02712.34
5.2.150.0000.03312.34
5.2.140.0000.03712.34
5.2.130.0070.02312.34
5.2.120.0000.03012.34
5.2.110.0000.03312.34
5.2.100.0000.02712.34
5.2.90.0030.02312.34
5.2.80.0000.03012.34
5.2.70.0030.02312.34
5.2.60.0130.03712.34
5.2.50.0070.04012.34
5.2.40.0100.05012.34
5.2.30.0000.02712.34
5.2.20.0000.03012.34
5.2.10.0000.04312.34
5.2.00.0030.05312.34
5.1.60.0030.02012.34
5.1.50.0000.05712.34
5.1.40.0070.01712.34
5.1.30.0100.01712.34
5.1.20.0030.04312.34
5.1.10.0070.04712.34
5.1.00.0070.04712.34
5.0.50.0030.03312.34
5.0.40.0000.03312.34
5.0.30.0030.03312.34
5.0.20.0030.03312.34
5.0.10.0070.04012.34
5.0.00.0000.04312.34
4.4.90.0070.02312.34
4.4.80.0070.03012.34
4.4.70.0000.03312.34
4.4.60.0000.02712.34
4.4.50.0030.01712.34
4.4.40.0000.02012.34
4.4.30.0030.02312.34
4.4.20.0030.01712.34
4.4.10.0070.00712.34
4.4.00.0000.02712.34
4.3.110.0000.01312.34
4.3.100.0000.03712.34
4.3.90.0030.02712.34
4.3.80.0000.03312.34
4.3.70.0000.03012.34
4.3.60.0000.03012.34
4.3.50.0030.02712.34
4.3.40.0030.02312.34
4.3.30.0000.01712.34
4.3.20.0000.02712.34
4.3.10.0030.02012.34
4.3.00.0030.02312.34

preferences:
43.02 ms | 401 KiB | 5 Q