3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Nested\Name; class Test { public static function speak(string | object $name) { if (is_string($name)) { var_dump($name); } else { var_dump($name::class); } } } class Name{} Test::speak(Name::class); Test::speak(new Name);

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.130.0120.01018.90
8.4.120.0150.00624.38
8.4.110.0080.01217.94
8.4.100.0110.00818.92
8.4.90.0060.00420.89
8.4.80.0080.00520.46
8.4.70.0050.00318.68
8.4.60.0090.01218.75
8.4.50.0100.01017.66
8.4.40.0130.00717.65
8.4.30.0030.00620.33
8.4.20.0120.00917.80
8.4.10.0060.01326.04
8.3.260.0040.00416.66
8.3.250.0100.00918.86
8.3.240.0090.00917.20
8.3.230.0110.00816.30
8.3.220.0120.00718.94
8.3.210.0090.01016.45
8.3.200.0050.00616.64
8.3.190.0110.00816.55
8.3.180.0100.00618.51
8.3.170.0160.00316.63
8.3.160.0120.00619.14
8.3.150.0060.01317.25
8.3.140.0040.00417.09
8.3.130.0000.00818.39
8.3.120.0040.00418.87
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0040.00726.77
8.3.80.0050.00519.36
8.3.70.0140.00716.58
8.3.60.0120.00916.50
8.3.50.0080.01223.71
8.3.40.0100.00318.84
8.3.30.0090.00618.59
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0050.00326.16
8.2.290.0120.00620.60
8.2.280.0040.00518.17
8.2.270.0070.01016.49
8.2.260.0000.01516.73
8.2.250.0060.00318.20
8.2.240.0060.00319.12
8.2.230.0060.00322.58
8.2.220.0030.00737.54
8.2.210.0110.00726.77
8.2.200.0060.00318.88
8.2.190.0060.00916.58
8.2.180.0140.00725.92
8.2.170.0130.00718.95
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0060.00620.52
8.2.100.0120.00020.34
8.1.330.0120.00721.69
8.1.320.0110.00918.06
8.1.310.0080.00818.38
8.1.300.0000.01519.68
8.1.290.0030.00730.84
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0050.00328.09
8.1.250.0050.00328.09
8.1.240.0070.00418.49
8.1.230.0070.00418.37
8.0.10.0130.00917.21
8.0.00.0100.01016.96
7.4.140.0070.01116.48
7.4.130.0050.01416.32
7.4.120.0110.00516.43
7.4.110.0200.01016.44
7.4.100.0140.00316.40
7.4.90.0170.00016.34
7.4.80.0100.00716.46
7.4.70.0150.00316.51
7.4.60.0120.00616.34
7.4.50.0080.00916.27
7.4.40.0100.01016.44
7.4.30.0120.00916.42
7.4.20.0110.00816.53
7.4.10.0030.01416.47
7.4.00.0100.01016.34
7.3.260.0070.02016.50
7.3.250.0100.00616.10
7.3.240.0060.01216.17
7.3.230.0070.01115.96
7.3.220.0070.01016.31
7.3.210.0130.00316.15
7.3.200.0140.00316.30
7.3.190.0060.01216.40
7.3.180.0130.00316.11
7.3.170.0080.00816.21
7.3.160.0100.01316.28
7.3.150.0100.01016.48
7.3.140.0070.01016.24
7.3.130.0110.00516.22
7.3.120.0070.01416.18
7.3.110.0120.00916.40
7.3.100.0160.01016.14
7.3.90.0130.00316.14
7.3.80.0030.01916.20
7.3.70.0140.01016.35
7.3.60.0150.00916.24
7.3.50.0160.00016.27
7.3.40.0080.00816.01
7.3.30.0100.00716.14
7.3.20.0110.01816.18
7.3.10.0070.01816.36
7.3.00.0130.00316.38

preferences:
60.95 ms | 403 KiB | 5 Q