3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function foo() { return 'A'; } } class B extends A { public static function withSelf() { return self::foo(); } public static function withParent() { return parent::foo(); } public static function withStatic() { return static::foo(); } public static function withClass() { return parent::class::foo(); } } echo 'Self: '.B::withSelf(), PHP_EOL, 'Parent: '.B::withParent(), PHP_EOL, 'Static: '.B::withStatic(), PHP_EOL, 'Class: '.B::withClass();

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.70.0120.00918.31
8.3.60.0110.00416.63
8.3.50.0150.01021.13
8.3.40.0040.01118.79
8.3.30.0100.00618.72
8.3.20.0070.00020.22
8.3.10.0060.00321.90
8.3.00.0080.00023.66
8.2.190.0110.00316.58
8.2.180.0120.00316.32
8.2.170.0070.00722.96
8.2.160.0100.00320.40
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00419.70
8.2.120.0000.00826.35
8.2.110.0000.00822.05
8.2.100.0070.00318.78
8.1.280.0040.01125.92
8.1.270.0000.00820.37
8.1.260.0060.00328.09
8.1.250.0050.00328.09
8.1.240.0030.00618.46
8.1.230.0030.00618.36
7.0.10.0130.08320.24
7.0.00.0030.05320.09
5.6.160.0070.07320.56
5.6.150.0030.04018.21
5.6.140.0070.08018.24
5.6.130.0000.08318.24
5.6.120.0030.04721.00
5.6.110.0100.09020.94
5.6.100.0030.05721.05
5.6.90.0030.08021.00
5.6.80.0030.04720.39
5.5.300.0100.06017.95
5.5.290.0070.03718.08
5.5.280.0030.04320.74
5.5.270.0000.06020.98
5.5.260.0130.06320.85
5.5.250.0070.08020.71
5.5.240.0100.03020.28

preferences:
33.51 ms | 401 KiB | 5 Q