3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public static function foo() { return static::class; } public static function bar() { return get_called_class(); } } class Child extends Base {} profile("Parent, static::class", function () { Base::foo();}); profile("Parent, get_called_class", function () { Base::bar();}); profile("Child, static::class", function () { Child::foo();}); profile("Child, get_called_class", function () { Child::bar();}); function profile($what, callable $func) { static $previous; if (!$previous) $previous = microtime(true); for ($a = 0; $a<=1000000; $a++) { $func(); }; $now = microtime(true); echo sprintf("%s took %.4f seconds", $what, $now - $previous), PHP_EOL; $previous = $now; }

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.2.30.0070.14617.68
8.2.20.0030.14217.62
8.2.10.0110.15317.73
8.2.00.0100.15317.68
8.1.160.0090.13217.89
8.1.150.0150.15017.40
8.1.140.0160.13717.42
8.1.130.0150.14517.42
8.1.120.0120.14617.49
8.1.110.0080.14617.54
8.1.100.0120.13617.46
8.1.90.0090.14217.48
8.1.80.0120.14817.51
8.1.70.0100.14417.52
8.1.60.0160.12717.58
8.1.50.0160.14317.55
8.1.40.0100.13817.53
8.1.30.0090.14317.59
8.1.20.0100.14117.61
8.1.10.0150.13117.49
8.1.00.0120.14217.48
8.0.280.0090.14316.87
8.0.270.0110.13916.84
8.0.260.0120.14816.86
8.0.250.0080.14816.87
8.0.240.0070.14316.84
8.0.230.0050.14416.88
8.0.220.0090.16016.83
8.0.210.0150.13316.88
8.0.200.0150.13016.87
8.0.190.0100.14216.92
8.0.180.0120.13716.84
8.0.170.0100.13216.95
8.0.160.0070.14416.94
8.0.150.0100.13816.83
8.0.140.0080.14716.83
8.0.130.0100.16616.84
8.0.120.0000.17416.86
8.0.110.0070.13716.83
8.0.100.0100.15116.83
8.0.90.0120.13316.81
8.0.80.0070.14816.81
8.0.70.0030.15616.76
8.0.60.0100.15316.81
8.0.50.0150.14316.88
8.0.30.0170.13416.90
8.0.20.0080.13716.85
8.0.10.0100.14116.96
8.0.00.0130.15217.10
7.4.330.0050.18516.73
7.4.320.0150.17316.73
7.4.300.0130.17516.73
7.4.290.0110.18016.73
7.4.280.0100.17816.73
7.4.270.0090.19216.73
7.4.260.0160.17616.73
7.4.250.0210.17716.73
7.4.240.0080.18716.73
7.4.230.0070.19016.73
7.4.220.0120.17616.73
7.4.210.0130.17616.73
7.4.200.0080.18116.73
7.4.190.0100.18416.73
7.4.180.0100.18516.73
7.4.160.0070.19016.73
7.4.150.0080.19916.73
7.4.140.0070.17916.73
7.4.130.0100.18516.73
7.4.120.0110.18416.73
7.4.110.0130.16916.73
7.4.100.0060.20816.74
7.4.90.0090.20216.59
7.4.80.0100.20016.68
7.4.70.0130.20516.60
7.4.60.0090.22316.57
7.4.50.0120.20916.58
7.4.40.0090.23116.62
7.4.30.0120.22316.62
7.4.20.0110.27316.65
7.4.10.0110.24816.68
7.4.00.0120.21316.65
7.3.330.0080.19716.73
7.3.320.0100.20016.73
7.3.310.0080.19116.73
7.3.300.0050.19216.73
7.3.290.0080.19116.73
7.3.280.0100.19416.73
7.3.270.0130.18516.73
7.3.260.0080.19116.73
7.3.250.0080.19016.73
7.3.240.0050.21316.73
7.3.230.0130.18616.73
7.3.220.0080.22016.61
7.3.210.0100.26216.67
7.3.200.0070.22516.67
7.3.190.0090.28016.61
7.3.180.0100.26216.51
7.3.170.0080.22416.53
7.3.160.0100.22616.61
7.3.150.0070.24316.70
7.3.140.0090.23816.59
7.3.130.0100.25316.50
7.3.120.0130.28916.55
7.3.110.0090.25616.60
7.3.100.0090.25516.53
7.3.90.0090.26916.63
7.3.80.0080.24616.55
7.3.70.0080.28416.56
7.3.60.0140.25316.63
7.3.50.0060.24316.57
7.3.40.0150.26316.57
7.3.30.0110.21916.55
7.3.20.0110.25317.26
7.3.10.0090.22717.32
7.3.00.0130.24617.21
7.2.340.0110.23616.73
7.2.330.0120.31616.62
7.2.320.0090.25916.75
7.2.310.0100.26216.72
7.2.300.0130.28116.67
7.2.290.0100.30416.65
7.2.280.0100.29116.75
7.2.270.0080.29716.72
7.2.260.0130.26416.66
7.2.250.0150.31616.65
7.2.240.0130.29616.61
7.2.230.0110.25116.72
7.2.220.0130.26516.68
7.2.210.0070.26516.60
7.2.200.0140.26516.65
7.2.190.0070.27316.68
7.2.180.0140.26216.64
7.2.170.0140.26616.71
7.2.160.0120.24816.72
7.2.150.0120.25117.52
7.2.140.0130.24117.49
7.2.130.0130.24217.56
7.2.120.0130.29817.52
7.2.110.0090.25917.57
7.2.100.0110.25217.52
7.2.90.0130.26817.58
7.2.80.0120.25717.56
7.2.70.0120.26417.51
7.2.60.0110.27417.56
7.2.50.0120.26717.50
7.2.40.1470.25717.66
7.2.30.1160.25717.66
7.2.20.1030.25417.56
7.2.10.1140.25517.57
7.2.00.0100.27117.71
7.1.330.0190.35416.38
7.1.320.0170.32816.48
7.1.310.0180.34016.43
7.1.300.0200.32116.43
7.1.290.0190.29316.39
7.1.280.0160.32416.38
7.1.270.0160.30416.46
7.1.260.0190.29816.38
7.1.250.0150.36216.37
7.1.240.0200.35016.53
7.1.230.0150.34916.47
7.1.220.0170.30116.49
7.1.210.0150.34216.39
7.1.200.0170.29616.37
7.1.190.0180.36516.42
7.1.180.0170.34616.34
7.1.170.0290.32716.44
7.1.160.1190.29716.43
7.1.150.1200.31716.44
7.1.140.0980.32016.48
7.1.130.0180.30816.45
7.1.120.0130.32016.41
7.1.110.0170.29716.31
7.1.100.0190.30316.36
7.1.90.0150.30316.34
7.1.80.0200.29516.41
7.1.70.0190.31316.13
7.1.60.0190.28119.78
7.1.50.0210.34019.75
7.1.40.0220.33319.66
7.1.30.1270.35919.76
7.1.20.0270.37119.67
7.1.10.1510.33416.09
7.1.00.1970.31216.01
7.0.330.0200.38916.05
7.0.320.0190.30716.11
7.0.310.0150.34716.03
7.0.300.0120.31916.08
7.0.290.0150.33116.10
7.0.280.0180.33216.07
7.0.270.0160.31916.11
7.0.260.0190.31716.08
7.0.250.0120.32016.18
7.0.240.0190.35816.15
7.0.230.0200.31216.20
7.0.220.0220.34816.12
7.0.210.0200.32916.14
7.0.200.0190.31716.09
7.0.190.0210.36416.10
7.0.180.0140.33416.19
7.0.170.0200.33216.18
7.0.160.0190.28516.09
7.0.150.0190.28616.10
7.0.140.0250.32316.07
7.0.130.0150.33916.07
7.0.120.0160.31216.10
7.0.110.0190.37816.07
7.0.100.0150.33616.14
7.0.90.0280.34316.05
7.0.80.0170.32816.01
7.0.70.0130.34316.05
7.0.60.0150.36916.14
7.0.50.0140.32216.04
7.0.40.0110.28616.07
7.0.30.0140.29816.15
7.0.20.0180.28215.99
7.0.10.0150.27916.10
7.0.00.0130.31916.08
5.6.400.0230.81416.39
5.6.390.0170.93716.36
5.6.380.0130.84216.32
5.6.370.0120.89716.40
5.6.360.0250.82116.33
5.6.350.0220.78916.42
5.6.340.0130.82816.37
5.6.330.0210.82716.33
5.6.320.0130.82716.38
5.6.310.0140.84516.30
5.6.300.0170.79716.32
5.6.290.0160.84416.31
5.6.280.0200.80216.36
5.6.270.0110.82616.28
5.6.260.0190.80216.29
5.6.250.0160.84416.43
5.6.240.0180.82616.31
5.6.230.0160.83516.32
5.6.220.0140.84716.32
5.6.210.0150.83216.26
5.6.200.0140.83516.34
5.6.190.0120.84616.30
5.6.180.0200.81316.24
5.6.170.0120.81216.28
5.6.160.0190.93916.34
5.6.150.0110.91816.44
5.6.140.0160.89516.32
5.6.130.0080.87716.37
5.6.120.0080.85116.37
5.6.110.0140.84516.41
5.6.100.0130.83916.27
5.6.90.0090.85316.25
5.6.80.0080.83616.20
5.6.70.0090.86216.28
5.6.60.0130.83016.26
5.6.50.0080.81416.29
5.6.40.0070.80716.29
5.6.30.0170.82116.28
5.6.20.0220.85016.25
5.6.10.0220.81716.14
5.6.00.0150.78616.16

preferences:
30.55 ms | 403 KiB | 5 Q