3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A; $version = '10.'; if (str_starts_with($version, '10.')) { class Comparator { public static function test() { echo "a"; } } } else { class Comparator { public static function test() { echo "b"; } } } Comparator::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.3.120.0070.00720.72
8.3.110.0040.00416.75
8.3.100.0030.00616.37
8.3.90.0050.00326.77
8.3.80.0000.01117.97
8.3.70.0110.01116.50
8.3.60.0070.00718.22
8.3.50.0070.01316.64
8.3.40.0140.00021.74
8.3.30.0130.00022.14
8.3.20.0150.00425.66
8.3.10.0120.00825.66
8.3.00.0130.00625.66
8.2.240.0090.00016.68
8.2.230.0040.00420.94
8.2.220.0090.00624.06
8.2.210.0100.00726.77
8.2.200.0030.00618.04
8.2.190.0110.00716.58
8.2.180.0100.01016.50
8.2.170.0110.00318.92
8.2.160.0140.00022.96
8.2.150.0060.01425.66
8.2.140.0110.01125.66
8.2.130.0110.00725.66
8.2.120.0070.00725.66
8.2.110.0140.01125.66
8.2.100.0130.00725.66
8.2.90.0030.01725.66
8.2.80.0120.00625.66
8.2.70.0070.00725.66
8.2.60.0120.00325.66
8.2.50.0110.00425.66
8.2.40.0070.00725.66
8.2.30.0060.01025.66
8.2.20.0040.01125.66
8.2.10.0000.01525.66
8.2.00.0070.00725.66
8.1.300.0090.00918.65
8.1.290.0000.01030.84
8.1.280.0070.01425.92
8.1.270.0030.01025.66
8.1.260.0110.00425.66
8.1.250.0100.00325.66
8.1.240.0040.01125.66
8.1.230.0100.01425.66
8.1.220.0120.00325.66
8.1.210.0160.00425.66
8.1.200.0090.00925.66
8.1.190.0040.01125.66
8.1.180.0200.00025.66
8.1.170.0120.00625.66
8.1.160.0120.00625.66
8.1.150.0100.00325.66
8.1.140.0080.00625.66
8.1.130.0100.00325.66
8.1.120.0110.00425.66
8.1.110.0140.00025.66
8.1.100.0070.00725.66
8.1.90.0090.00625.66
8.1.80.0140.00025.66
8.1.70.0110.00325.66
8.1.60.0090.00625.66
8.1.50.0040.01125.66
8.1.40.0070.00725.66
8.1.30.0080.00825.66
8.1.20.0110.00425.66
8.1.10.0060.00825.66
8.1.00.0110.00425.66

preferences:
29.4 ms | 406 KiB | 6 Q