3v4l.org

run code in 300+ PHP versions simultaneously
<?php function super(... $args) { $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 2); if(($object = $trace[1]["object"]) || ($object = $trace[1]["class"])) { $method = $trace[1]["function"]; $parent = get_parent_class($object); if(method_exists($parent, $method)) { $method = new ReflectionMethod($parent, $method); return $method->invoke(is_object($object) ? $object : NULL); } else throw new BadMethodCallException("Method " . $parent . "::" . $method ." does not exist."); } else throw new BadFunctionCallException("super() can only be called from a class context."); } class HasSuper { protected function super(... $args) { $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); $method = $trace[1]["function"]; $parent = get_parent_class($this); if(method_exists($parent, $method)) { $method = new ReflectionMethod($parent, $method); $method->invoke($this); } else throw new BadMethodCallException("Method " . $callback . " does not exist."); } } class Foo extends HasSuper { public function hello() { echo("Hello World!" . PHP_EOL); } } class Bar extends Foo { public function hello() { $this->super(); super(); } } $bar = new Bar; $bar->hello();

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.0140.00316.63
8.3.50.0110.00818.05
8.3.40.0040.01118.61
8.3.30.0000.01418.78
8.3.20.0020.00520.00
8.3.10.0040.00420.39
8.3.00.0040.00421.89
8.2.180.0100.01318.16
8.2.170.0110.01122.96
8.2.160.0090.00620.35
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00420.52
8.2.120.0050.00326.35
8.2.110.0030.00722.23
8.2.100.0040.00717.84
8.2.90.0000.00819.22
8.2.80.0060.00317.97
8.2.70.0000.00817.75
8.2.60.0040.00418.05
8.2.50.0030.00618.10
8.2.40.0040.00422.14
8.2.30.0000.00819.39
8.2.20.0000.00718.04
8.2.10.0040.00418.07
8.2.00.0000.00718.42
8.1.280.0110.00725.92
8.1.270.0050.00322.10
8.1.260.0080.00026.35
8.1.250.0100.00028.09
8.1.240.0070.00422.06
8.1.230.0090.00317.77
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0030.00517.36
8.1.180.0050.00318.10
8.1.170.0080.00018.59
8.1.160.0040.00418.79
8.1.150.0000.00720.18
8.1.140.0000.00819.64
8.1.130.0030.00320.80
8.1.120.0050.00317.47
8.1.110.0040.00417.41
8.1.100.0050.00217.45
8.1.90.0070.00017.46
8.1.80.0040.00417.52
8.1.70.0030.00317.45
8.1.60.0000.00817.62
8.1.50.0040.00417.41
8.1.40.0090.00017.50
8.1.30.0050.00317.62
8.1.20.0040.00417.57
8.1.10.0040.00417.62
8.1.00.0000.00817.41
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00518.33
8.0.270.0000.00717.27
8.0.260.0090.00017.27
8.0.250.0030.00616.91
8.0.240.0000.00916.92
8.0.230.0040.00417.03
8.0.220.0000.00816.93
8.0.210.0050.00316.76
8.0.200.0040.00617.00
8.0.190.0070.00016.96
8.0.180.0080.00016.82
8.0.170.0070.00016.84
8.0.160.0040.00416.84
8.0.150.0080.00016.97
8.0.140.0030.00316.80
8.0.130.0030.00313.32
8.0.120.0000.00816.87
8.0.110.0040.00416.73
8.0.100.0000.00716.85
8.0.90.0030.00516.78
8.0.80.0090.00916.95
8.0.70.0040.00416.95
8.0.60.0000.00716.90
8.0.50.0000.00716.96
8.0.30.0110.00617.10
8.0.20.0100.00817.40
8.0.10.0000.00717.02
8.0.00.0100.00716.77
7.4.330.0050.00015.55
7.4.320.0000.00616.47
7.4.300.0030.00316.50
7.4.290.0000.00716.52
7.4.280.0080.00016.51
7.4.270.0070.00016.41
7.4.260.0050.00216.59
7.4.250.0030.00316.57
7.4.240.0030.00416.61
7.4.230.0000.00716.27
7.4.220.0160.00316.71
7.4.210.0100.01016.50
7.4.200.0070.00016.57
7.4.160.0080.00816.42
7.4.150.0170.00017.40
7.4.140.0090.01217.86
7.4.130.0090.01016.45
7.4.120.0170.00816.53
7.4.110.0100.00716.45
7.4.100.0100.01316.57
7.4.90.0140.00316.52
7.4.80.0100.00719.39
7.4.70.0200.00316.37
7.4.60.0100.01316.61
7.4.50.0100.00616.25
7.4.40.0090.00616.45
7.4.30.0030.01716.74
7.4.00.0090.00915.08
7.3.330.0060.00313.34
7.3.320.0000.00613.29
7.3.310.0000.00716.39
7.3.300.0030.00316.38
7.3.290.0030.01116.38
7.3.280.0070.00916.37
7.3.270.0100.00717.40
7.3.260.0130.00616.31
7.3.250.0090.00916.43
7.3.240.0050.01416.30
7.3.230.0120.00816.39
7.3.210.0060.01316.35
7.3.200.0090.00616.54
7.3.190.0100.00616.51
7.3.180.0070.01016.60
7.3.170.0120.00916.32
7.3.160.0060.01016.45
7.3.120.0120.00314.67
7.3.110.0070.00714.74
7.3.100.0040.01214.54
7.3.90.0070.00714.76
7.3.80.0030.01214.63
7.3.70.0060.00314.69
7.3.60.0030.01114.89
7.3.50.0030.00814.86
7.3.40.0090.00614.48
7.3.30.0030.00614.76
7.3.20.0070.01016.66
7.3.10.0090.00616.67
7.3.00.0070.01116.32
7.2.330.0140.00716.48
7.2.320.0080.01216.71
7.2.310.0100.00716.75
7.2.300.0160.00916.43
7.2.290.0040.01216.56
7.2.250.0100.01014.95
7.2.240.0000.01615.20
7.2.230.0030.01315.04
7.2.220.0100.00315.28
7.2.210.0040.01115.10
7.2.200.0030.00914.82
7.2.190.0080.00415.25
7.2.180.0030.00814.93
7.2.170.0120.00014.95
7.2.60.0360.00716.71
7.2.50.0060.00916.75
7.2.00.0170.01018.68
7.1.330.0130.00016.01
7.1.320.0030.01015.79
7.1.310.0040.01115.60
7.1.300.0140.00015.84
7.1.290.0130.00315.53
7.1.280.0140.00015.63
7.1.270.0070.00715.66
7.1.260.0000.00915.91
7.1.200.0030.00715.79
7.1.70.0000.00917.27
7.1.60.0040.01117.04
7.1.50.0070.01416.69
7.1.30.3000.05736.51
7.1.20.0330.07036.41
7.1.10.0170.05720.46
7.1.00.0030.06720.67
7.0.200.0090.00316.87
7.0.170.0230.06320.09
7.0.160.0270.06720.12
7.0.150.0170.05320.24
7.0.140.3730.06320.04
7.0.130.0100.06320.13
7.0.120.0170.05320.11
7.0.110.0100.06020.18
7.0.100.0130.06020.07
7.0.90.0170.05020.17
7.0.80.0130.06320.12
7.0.70.0400.06720.27
7.0.60.0170.06720.21
7.0.50.0100.06720.12
7.0.40.0100.05720.11
7.0.30.0000.06320.23
7.0.20.0100.05720.15
7.0.10.0230.06020.12
7.0.00.0130.06019.96

preferences:
69.41 ms | 401 KiB | 5 Q