3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function save($a = 1, $b = 2) { printf('Class name %s, A = %s, B = %s%s', get_class($this), $a, $b, PHP_EOL); } } class B extends A { public function test() { $closure = Closure::fromCallable('parent::save'); $closure->bindTo($this); $invoker = new Invoker(); $invoker->run($closure, func_get_args()); } } class Invoker { public function run(Closure $closure, array $params) { $closure(...$params); } } $o = new B; $o->test(); $o->test('fff'); $o->test(100, 500); $o->test('a', 'b', 'c');

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.01618.43
8.3.50.0120.00917.98
8.3.40.0130.01018.91
8.3.30.0040.01118.67
8.3.20.0150.00320.39
8.3.10.0130.00620.86
8.3.00.0090.00920.18
8.2.180.0110.00418.54
8.2.170.0070.00722.96
8.2.160.0140.00720.57
8.2.150.0040.00424.18
8.2.140.0050.00524.66
8.2.130.0000.00726.16
8.2.120.0080.00019.54
8.2.110.0090.00022.11
8.2.100.0080.00317.91
8.2.90.0000.00817.75
8.2.80.0000.00818.78
8.2.70.0000.00817.63
8.2.60.0050.00317.63
8.2.50.0040.00418.10
8.2.40.0190.00021.92
8.2.30.0080.00019.34
8.2.20.0040.00418.14
8.2.10.0000.00818.16
8.2.00.0070.00018.04
8.1.280.0090.01225.92
8.1.270.0080.00022.14
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0030.00622.59
8.1.230.0080.00318.98
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0080.00017.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00818.46
8.1.160.0050.00319.00
8.1.150.0060.00322.05
8.1.140.0000.00719.56
8.1.130.0000.00718.85
8.1.120.0040.00417.55
8.1.110.0040.00417.49
8.1.100.0080.00017.47
8.1.90.0030.00517.38
8.1.80.0040.00417.45
8.1.70.0040.00417.45
8.1.60.0050.00317.62
8.1.50.0040.00417.46
8.1.40.0040.00417.44
8.1.30.0040.00417.68
8.1.20.0000.00917.64
8.1.10.0040.00417.60
8.1.00.0040.00417.42
8.0.300.0080.00019.73
8.0.290.0050.00216.75
8.0.280.0050.00318.46
8.0.270.0000.00817.17
8.0.260.0080.00318.85
8.0.250.0000.00716.93
8.0.240.0030.00316.96
8.0.230.0040.00417.06
8.0.220.0040.00416.92
8.0.210.0000.00716.98
8.0.200.0030.00316.99
8.0.190.0030.00517.09
8.0.180.0040.00416.88
8.0.170.0000.00716.85
8.0.160.0040.00416.96
8.0.150.0030.00516.97
8.0.140.0050.00316.96
8.0.130.0060.00013.34
8.0.120.0050.00316.93
8.0.110.0070.00016.79
8.0.100.0050.00316.82
8.0.90.0000.00716.86
8.0.80.0000.01517.03
8.0.70.0050.00317.07
8.0.60.0040.00417.01
8.0.50.0050.00317.05
8.0.30.0100.01117.00
8.0.20.0130.01017.40
8.0.10.0080.00017.07
8.0.00.0030.01616.73
7.4.330.0030.00315.55
7.4.320.0030.00316.61
7.4.300.0000.00716.53
7.4.290.0030.00516.52
7.4.280.0000.00716.51
7.4.270.0030.00316.48
7.4.260.0070.00316.52
7.4.250.0000.00716.56
7.4.240.0040.00416.41
7.4.230.0070.00016.42
7.4.220.0060.01216.40
7.4.210.0100.00716.57
7.4.200.0040.00416.61
7.4.160.0060.01116.37
7.4.150.0130.00317.40
7.4.140.0120.00617.86
7.4.130.0040.01316.48
7.4.120.0080.01316.52
7.4.110.0060.01016.53
7.4.100.0100.00716.62
7.4.90.0110.00616.45
7.4.80.0090.00819.39
7.4.70.0080.00916.58
7.4.60.0060.00916.40
7.4.50.0030.01216.61
7.4.40.0070.01416.45
7.4.30.0060.01716.54
7.4.00.0030.01414.97
7.3.330.0030.00313.24
7.3.320.0000.00513.11
7.3.310.0040.00416.35
7.3.300.0000.00716.27
7.3.290.0090.00916.21
7.3.280.0100.00716.23
7.3.270.0130.00617.40
7.3.260.0160.00316.20
7.3.250.0070.01016.21
7.3.240.0110.00616.42
7.3.230.0030.01516.32
7.3.210.0070.01016.37
7.3.200.0170.00016.45
7.3.190.0030.01316.42
7.3.180.0090.00616.16
7.3.170.0080.00816.61
7.3.160.0060.01116.45
7.3.10.0060.00516.64
7.3.00.0050.00916.42
7.2.330.0090.00916.27
7.2.320.0100.01316.35
7.2.310.0060.01016.76
7.2.300.0070.01016.62
7.2.290.0080.00816.41
7.2.130.0060.00516.82
7.2.120.0060.00916.88
7.2.110.0140.00516.68
7.2.100.0050.00716.89
7.2.90.0070.01016.79
7.2.80.0060.00816.76
7.2.70.0050.00716.78
7.2.60.0070.00416.79
7.2.50.0040.00916.77
7.2.40.0090.00516.77
7.2.30.0050.01016.87
7.2.20.0050.00716.80
7.2.10.0070.00716.96
7.2.00.0060.00716.79
7.1.250.0080.00715.80
7.1.200.0040.01115.84
7.1.80.0080.00618.01
7.1.70.0040.00917.19
7.1.60.0160.01034.84
7.1.50.0160.01634.87
7.1.40.0180.01134.37
7.1.30.0190.01234.49
7.1.20.0130.01534.57
7.1.10.0040.01016.30
7.1.00.0050.00816.64
7.0.200.0050.00816.73
7.0.190.0060.00816.64
7.0.180.0030.01016.22
7.0.170.0000.01416.24
7.0.160.0050.00816.21
7.0.150.0050.00916.15
7.0.140.0030.00915.99
7.0.130.0030.00916.45
7.0.120.0040.00716.46
7.0.110.0050.00816.19
7.0.100.0060.00816.40
7.0.90.0050.00816.14
7.0.80.0080.00516.21
7.0.70.0060.00616.21
7.0.60.0050.00816.16
7.0.50.0050.00916.22
7.0.40.0090.00616.35
7.0.30.0080.00516.33
7.0.20.0030.01016.36
7.0.10.0020.01316.16
7.0.00.0080.00616.34

preferences:
62.64 ms | 401 KiB | 5 Q