3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '' $regx = '(\\d)(?=(\\d{3})+$)'; $string = '919191911'; $pattern = '(\\d)(?=(\\d{3})+$)'; $replacement = '$1$4 $2$3$5'; echo preg_replace($pattern, $replacement, $string);

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)
5.4.270.0130.04718.66
5.4.260.0170.06318.75
5.4.250.0100.06718.74
5.4.240.0100.05018.76
5.4.230.0130.05019.09
5.4.220.0100.05718.81
5.4.210.0170.06318.86
5.4.200.0030.05719.08
5.4.190.0230.06318.75
5.4.180.0100.05718.98
5.4.170.0200.04318.92
5.4.160.0100.05718.74
5.4.150.0170.05018.92
5.4.140.0130.06316.51
5.4.130.0030.06016.46
5.4.120.0100.05316.33
5.4.110.0130.04316.54
5.4.100.0200.05316.51
5.4.90.0100.04716.48
5.4.80.0070.05016.52
5.4.70.0100.06716.38
5.4.60.0070.06016.42
5.4.50.0070.05316.48
5.4.40.0230.04016.36
5.4.30.0000.05316.33
5.4.20.0030.05716.50
5.4.10.0130.04316.52
5.4.00.0000.06015.79
5.3.280.0070.05314.48
5.3.270.0070.07714.61
5.3.260.0070.05714.63
5.3.250.0170.04314.49
5.3.240.0030.06014.63
5.3.230.0000.06314.37
5.3.220.0070.05014.59
5.3.210.0000.06014.43
5.3.200.0200.06314.44
5.3.190.0100.04714.57
5.3.180.0130.04314.26
5.3.170.0200.03314.42
5.3.160.0070.05714.45
5.3.150.0100.07014.56
5.3.140.0100.05714.55
5.3.130.0100.05314.41
5.3.120.0100.05014.45
5.3.110.0130.06014.55
5.3.100.0100.06713.88
5.3.90.0100.05013.91
5.3.80.0100.05313.72
5.3.70.0100.05714.04
5.3.60.0000.05714.02
5.3.50.0100.05013.79
5.3.40.0070.05313.95
5.3.30.0070.07313.85
5.3.20.0130.04313.72
5.3.10.0070.05713.66
5.3.00.0100.04713.48
5.2.170.0100.03711.16
5.2.160.0130.05011.04
5.2.150.0070.04011.15
5.2.140.0100.04711.15
5.2.130.0070.03711.00
5.2.120.0030.04311.10
5.2.110.0100.03311.10
5.2.100.0070.04011.20
5.2.90.0170.03310.86
5.2.80.0200.03011.12
5.2.70.0100.05711.20
5.2.60.0070.05311.07
5.2.50.0030.06310.78
5.2.40.0070.04010.91
5.2.30.0000.04310.99
5.2.20.0230.04010.95
5.2.10.0100.05010.78
5.2.00.0070.04010.93
5.1.60.0070.03010.23
5.1.50.0030.03310.14
5.1.40.0000.03710.06
5.1.30.0030.04010.25
5.1.20.0100.04310.42
5.1.10.0100.03310.15
5.1.00.0000.04010.12
5.0.50.0070.0278.32
5.0.40.0030.0408.34
5.0.30.0030.0408.25
5.0.20.0000.0308.28
5.0.10.0030.0278.36
5.0.00.0030.0408.24
4.4.90.0030.0276.96
4.4.80.0030.0276.96
4.4.70.0000.0336.97
4.4.60.0030.0206.97
4.4.50.0070.0276.97
4.4.40.0100.0276.96
4.4.30.0030.0236.96
4.4.20.0070.0206.96
4.4.10.0070.0206.96
4.4.00.0070.0306.96
4.3.110.0070.0176.96
4.3.100.0000.0306.96
4.3.90.0000.0336.96
4.3.80.0070.0276.96
4.3.70.0070.0276.96
4.3.60.0030.0206.96
4.3.50.0000.0306.96
4.3.40.0000.0476.96
4.3.30.0000.0236.96
4.3.20.0030.0206.96
4.3.10.0000.0306.96
4.3.00.0030.01713.49

preferences:
146.84 ms | 1394 KiB | 7 Q