3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait StaticTraitAccess { public static function cases() { return [ 'one' => 'won', 'two' => 'chwo', 'three' => 'tree', ]; } public static function thisIsWhatTheyreTalkingAbout() { return static::cases(); } } class StaticClassAccess { use StaticTraitAccess; public function staticCall1(): array { return static::thisIsWhatTheyreTalkingAbout(); } public function staticCall2(): array { return StaticClassAccess::thisIsWhatTheyreTalkingAbout(); } public function staticCall3(): array { return StaticTraitAccess::thisIsWhatTheyreTalkingAbout(); } } $sca = new StaticClassAccess(); var_dump($sca->staticCall1()); var_dump($sca->staticCall2()); var_dump($sca->staticCall3());

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.5.10.0100.00719.69
8.5.00.0120.01119.92
8.4.150.0030.00014.05
8.4.140.0170.00517.65
8.4.130.0110.00817.86
8.4.120.0050.00822.50
8.4.110.0150.00522.28
8.4.100.0050.00418.06
8.4.90.0150.00718.55
8.4.80.0110.00719.44
8.4.70.0060.00517.93
8.4.60.0090.01217.99
8.4.50.0140.01019.97
8.4.40.0170.00317.75
8.4.30.0120.00620.45
8.4.20.0100.01018.06
8.4.10.0040.00423.67
8.3.280.0120.00918.53
8.3.270.0090.01316.50
8.3.260.0110.00816.86
8.3.250.0120.00718.83
8.3.240.0120.00816.76
8.3.230.0090.01316.77
8.3.220.0120.00617.23
8.3.210.0120.00816.98
8.3.200.0060.00216.65
8.3.190.0100.00916.89
8.3.180.0130.00616.39
8.3.170.0070.01117.29
8.3.160.0180.00918.60
8.3.150.0000.01817.12
8.3.140.0120.00318.88
8.3.130.0060.00318.35
8.3.120.0060.00320.83
8.3.110.0060.00320.94
8.3.100.0090.00024.06
8.3.90.0080.00026.77
8.3.80.0080.00417.97
8.3.70.0190.00016.88
8.3.60.0100.01316.63
8.3.50.0180.00316.77
8.3.40.0130.00720.32
8.3.30.0090.00619.95
8.3.20.0080.00024.18
8.3.10.0060.00723.95
8.3.00.0040.00426.16
8.2.290.0100.00920.27
8.2.280.0090.01018.73
8.2.270.0080.00017.05
8.2.260.0090.00920.64
8.2.250.0000.01116.86
8.2.240.0090.00616.75
8.2.230.0040.00422.58
8.2.220.0000.00837.54
8.2.210.0060.01226.77
8.2.200.0100.00018.41
8.2.190.0100.00716.58
8.2.180.0100.01016.38
8.2.170.0130.00618.91
8.2.160.0110.00422.96
8.2.150.0050.00225.66
8.2.140.0000.01124.66
8.2.130.0080.00723.58
8.2.120.0070.00021.11
8.2.110.0030.00622.13
8.2.100.0060.00320.47
8.2.90.0150.00717.61
8.2.10.0190.00218.84
8.2.00.0130.00718.36
8.1.330.0090.01021.75
8.1.320.0150.00416.06
8.1.310.0250.00816.82
8.1.300.0080.00016.10
8.1.290.0060.00318.88
8.1.280.0100.00725.92
8.1.270.0030.00621.89
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00318.86
8.1.230.0040.01118.62
8.1.200.0110.00724.94
8.1.00.0130.01125.92
8.0.290.0050.01218.25
8.0.00.0150.00925.92
7.4.330.0130.00752.62
5.6.400.0060.00579.33

preferences:
31.52 ms | 403 KiB | 5 Q