3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hexColorCode = '#ffffff'; $start = microtime(TRUE); str_replace('#', '', $hexColorCode); $end = microtime(TRUE); echo $end - $start; echo "\n----"; $start = microtime(TRUE); ltrim($hexColorCode, '#'); $end = microtime(TRUE); echo $end - $start;

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)
7.3.10.0090.00616.54
7.3.00.0110.00416.77
7.2.130.0080.00416.96
7.2.120.0100.00316.84
7.2.110.0030.01016.63
7.2.100.0040.01116.72
7.2.90.0060.00617.04
7.2.80.0060.00316.99
7.2.70.0080.00616.93
7.2.60.0000.01416.80
7.2.50.0000.01116.70
7.2.40.0030.01216.86
7.2.30.0040.00416.90
7.2.20.0090.00616.97
7.2.10.0080.00016.87
7.2.00.0050.00918.13
7.1.250.0090.00615.49
7.1.70.0070.00316.83
7.1.60.0070.01719.43
7.1.50.0060.01616.90
7.1.00.0030.07722.56
7.0.200.0290.00714.63
7.0.60.0130.08019.82
7.0.50.0070.05317.80
7.0.40.0130.07320.18
7.0.30.0070.04020.16
7.0.20.0200.09020.32
7.0.10.0100.07320.13
7.0.00.0000.06720.01
5.6.280.0000.04321.11
5.6.210.0070.07720.66
5.6.200.0100.03718.15
5.6.190.0100.04720.36
5.6.180.0400.05020.41
5.6.170.0270.04320.33
5.6.160.0100.08020.48
5.6.150.0100.05018.12
5.6.140.0100.07718.20
5.6.130.0130.07718.12
5.6.120.0030.04720.98
5.6.110.0070.05721.02
5.6.100.0130.06320.98
5.6.90.0070.04021.02
5.6.80.0070.08320.36
5.5.350.0370.07020.51
5.5.340.0030.04017.95
5.5.330.0170.06320.21
5.5.320.0230.04020.50
5.5.310.0230.08720.41
5.5.300.0000.08317.88
5.5.290.0100.07717.88
5.5.280.0130.08320.76
5.5.270.0130.04320.86
5.5.260.0070.04320.61
5.5.250.0070.07320.58
5.5.240.0070.07720.27
5.4.450.0070.06018.94
5.4.440.0230.04719.47
5.4.430.0270.07019.25
5.4.420.0570.05319.24
5.4.410.0700.04719.40
5.4.400.0900.04319.21
5.4.390.0570.06719.17
5.4.380.0630.05318.61
5.4.370.0630.05018.92
5.4.360.0700.07018.82
5.4.350.0730.07018.61
5.4.340.0870.07319.14
5.4.320.0830.06719.00
5.4.310.0730.07019.02
5.4.300.0730.04718.88
5.4.290.0730.06719.14
5.4.280.0600.06019.10
5.4.270.0830.07018.80
5.4.260.0800.07018.89
5.4.250.0730.07719.09
5.4.240.0830.06318.91
5.4.230.0700.07319.18
5.4.220.0630.08018.85
5.4.210.0500.05319.20
5.4.200.0630.06319.18
5.4.190.0730.04718.60
5.4.180.0630.04719.13
5.4.170.0730.06019.08
5.4.160.0770.04718.81
5.4.150.0630.05319.12
5.4.140.0700.05016.14
5.4.130.0730.04716.29
5.4.120.0630.07016.42
5.4.110.0630.05016.41
5.4.100.0630.05716.41
5.4.90.0570.05016.45
5.4.80.0700.07016.03
5.4.70.0670.05716.43
5.4.60.0770.06316.41
5.4.50.0670.05316.33
5.4.40.0830.05716.41
5.4.30.0600.05316.26
5.4.20.0500.06716.13
5.4.10.0700.06716.32
5.4.00.0800.06015.70

preferences:
48.97 ms | 403 KiB | 5 Q