3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CLocale { public function test() { return self::getCanonicalID('foo-bar'); } public static function getCanonicalID($id) { return strtolower(str_replace('-','_',$id)); } } class MyLocale extends CLocale { public static function getCanonicalID($id) { return strtolower(str_replace('-','/',$id)); } } echo (new MyLocale())->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.10.0030.00619.38
8.3.140.0000.00817.04
8.3.130.0070.01118.25
8.3.120.0120.00418.88
8.3.110.0090.00020.94
8.3.100.0090.00016.44
8.3.90.0070.00026.77
8.3.80.0040.00417.97
8.3.70.0120.00316.25
8.3.60.0140.00417.98
8.3.50.0090.00916.59
8.3.40.0120.00621.77
8.3.30.0040.01120.17
8.3.20.0220.00025.66
8.3.10.0100.01325.66
8.3.00.0170.01025.66
8.2.260.0060.01216.58
8.2.250.0050.00318.45
8.2.240.0060.00918.89
8.2.230.0050.00322.58
8.2.220.0070.00724.06
8.2.210.0000.00726.77
8.2.200.0060.00316.75
8.2.190.0090.00616.58
8.2.180.0060.01216.63
8.2.170.0140.00718.73
8.2.160.0110.00322.96
8.2.150.0000.01525.66
8.2.140.0110.00425.66
8.2.130.0150.00025.66
8.2.120.0040.01225.66
8.2.110.0060.00925.66
8.2.100.0140.00425.66
8.2.90.0090.00625.66
8.2.80.0090.00625.66
8.2.70.0120.00325.66
8.2.60.0070.01125.66
8.2.50.0060.01225.66
8.2.40.0160.00625.66
8.2.30.0140.01025.66
8.2.20.0090.00925.66
8.2.10.0110.00425.66
8.2.00.0120.00325.66
8.1.310.0040.00416.70
8.1.300.0000.00919.34
8.1.290.0090.00030.84
8.1.280.0070.01425.92
8.1.270.0030.01225.66
8.1.260.0070.00725.66
8.1.250.0070.00725.66
8.1.240.0120.00325.66
8.1.230.0090.00625.66
8.1.220.0100.00625.66
8.1.210.0090.00625.66
8.1.200.0150.00025.66
8.1.190.0070.00725.66
8.1.180.0070.00725.66
8.1.170.0000.01425.66
8.1.160.0030.01425.66
8.1.150.0140.00425.66
8.1.140.0100.00725.66
8.1.130.0120.00325.66
8.1.120.0120.00325.66
8.1.110.0040.01125.66
8.1.100.0070.00725.66
8.1.90.0060.01025.66
8.1.80.0040.01125.66
8.1.70.0120.00325.66
8.1.60.0080.00825.66
8.1.50.0090.00625.66
8.1.40.0040.01225.66
8.1.30.0150.00025.66
8.1.20.0070.00725.66
8.1.10.0090.00625.66
8.1.00.0060.00925.66

preferences:
26.15 ms | 403 KiB | 5 Q