3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function __callStatic($method, $args) { echo '__callStatic : ' . $method . "\n"; } private function privateMethod() { echo __METHOD__ . "\n"; } protected function protectedMethod() { echo __METHOD__ . "\n"; } public function publicMethod() { echo __METHOD__ . "\n"; } } class Bar extends Foo { } class Baz extends Bar { public function test() { echo __METHOD__ . "\n"; $grandparent_class = get_parent_class(parent::class); $grandparent_class::privateMethod(); $grandparent_class::protectedMethod(); $grandparent_class::publicMethod(); } }; $baz = new Baz(); $baz->test();

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.4.120.0120.00820.64
8.4.110.0070.01222.40
8.4.100.0070.01217.74
8.4.90.0120.00817.97
8.4.80.0140.00718.64
8.4.70.0120.00818.04
8.4.60.0130.00819.01
8.4.50.0120.00818.75
8.4.40.0110.00418.78
8.4.30.0060.01318.80
8.4.20.0090.00919.41
8.4.10.0090.00019.53
8.3.250.0080.01018.82
8.3.240.0110.00816.62
8.3.230.0110.00816.57
8.3.220.0050.00219.00
8.3.210.0050.00316.54
8.3.200.0040.00516.49
8.3.190.0120.00616.98
8.3.180.0140.00617.24
8.3.170.0160.00318.89
8.3.160.0040.01417.06
8.3.150.0100.01019.18
8.3.140.0040.00417.04
8.3.130.0040.00418.34
8.3.120.0040.01120.64
8.3.110.0040.00418.36
8.3.100.0090.00016.48
8.3.90.0050.00226.77
8.3.80.0060.00316.50
8.3.70.0120.00316.58
8.3.60.0120.00916.79
8.3.50.0100.00716.47
8.3.40.0200.00319.79
8.3.30.0040.01818.92
8.3.20.0180.00421.94
8.3.10.0070.01721.82
8.3.00.0130.00918.77
8.2.290.0120.00620.47
8.2.280.0140.00618.24
8.2.270.0140.00417.18
8.2.260.0110.00718.41
8.2.250.0110.00418.22
8.2.240.0060.00317.09
8.2.230.0080.00020.94
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0100.00018.41
8.2.190.0110.00716.88
8.2.180.0040.01518.51
8.2.170.0190.00319.13
8.2.160.0130.00620.20
8.2.150.0110.00719.10
8.2.140.0100.00720.36
8.2.130.0090.00920.32
8.2.120.0100.01019.27
8.2.110.0180.00019.22
8.2.100.0150.00619.25
8.2.90.0150.00718.91
8.2.80.0090.00919.26
8.2.70.0040.01418.70
8.2.60.0060.01218.94
8.2.50.0000.01818.97
8.2.40.0120.00918.61
8.2.30.0070.01518.70
8.2.20.0150.00618.66
8.2.10.0180.00418.66
8.2.00.0180.00318.66
8.1.330.0100.00818.15
8.1.320.0110.00716.22
8.1.310.0060.00918.20
8.1.300.0100.00017.80
8.1.290.0000.00930.84
8.1.280.0100.00725.92
8.1.270.0210.00022.23
8.1.260.0120.00922.04
8.1.250.0100.01022.10
8.1.240.0100.01018.57
8.1.230.0040.01818.57
8.1.220.0100.01018.87
8.1.210.0110.01118.35
8.1.200.0060.01918.80
8.1.190.0100.01018.68
8.1.180.0040.01418.31
8.1.170.0060.01318.82
8.1.160.0070.01418.48
8.1.150.0130.01018.65
8.1.140.0090.00918.59
8.1.130.0100.00718.55
8.1.120.0060.00918.70
8.1.110.0110.00418.63
8.1.100.0030.01219.79
8.1.90.0100.00718.54
8.1.80.0070.01019.72
8.1.70.0070.00718.80
8.1.60.0030.01218.59
8.1.50.0040.01118.58
8.1.40.0090.00618.66
8.1.30.0070.00718.83
8.1.20.0110.00419.83
8.1.10.0070.00718.64
8.1.00.0090.00618.60

preferences:
38.25 ms | 403 KiB | 5 Q