3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phone = '040783248898'; echo preg_replace('/.(?=.{4})/', '*', $phone);

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.120.0120.00520.19
8.4.110.0100.00922.36
8.4.100.0120.00917.81
8.4.90.0120.00820.40
8.4.80.0110.00920.93
8.4.70.0080.01118.86
8.4.60.0100.01122.29
8.4.50.0120.00518.26
8.4.40.0170.00917.78
8.4.30.0140.00718.08
8.4.20.0110.01018.61
8.4.10.0110.00518.57
8.3.250.0090.01218.59
8.3.240.0040.00416.52
8.3.230.0110.00816.56
8.3.220.0110.00718.94
8.3.210.0060.00216.48
8.3.200.0060.00316.54
8.3.190.0100.00516.93
8.3.180.0090.00318.75
8.3.170.0100.00816.73
8.3.160.0150.00416.58
8.3.150.0150.00516.92
8.3.140.0160.00417.43
8.3.130.0110.00216.58
8.3.120.0110.00617.65
8.3.110.0070.00618.63
8.3.100.0120.00616.55
8.3.90.0160.00221.72
8.3.80.0130.00217.43
8.3.70.0120.00616.49
8.3.60.0150.00517.50
8.3.50.0140.00416.74
8.3.40.0200.00918.68
8.3.30.0190.00618.23
8.3.20.0160.00419.74
8.3.10.0130.00319.79
8.3.00.0090.00718.39
8.2.290.0080.00316.81
8.2.280.0110.00818.29
8.2.270.0140.00616.77
8.2.260.0190.00416.63
8.2.250.0170.00317.50
8.2.240.0200.00616.86
8.2.230.0130.00519.58
8.2.220.0170.00320.31
8.2.210.0140.00521.57
8.2.200.0140.00717.18
8.2.190.0190.00717.54
8.2.180.0110.00916.57
8.2.170.0200.00818.24
8.2.160.0220.00518.78
8.2.150.0240.00718.34
8.2.140.0140.01018.97
8.2.130.0160.00518.85
8.2.120.0190.01018.46
8.2.110.0190.00618.48
8.2.100.0190.00918.36
8.2.90.0160.00618.38
8.2.80.0150.00418.55
8.2.70.0240.00418.21
8.2.60.0230.00418.30
8.2.50.0220.00818.44
8.2.40.0200.00618.39
8.2.30.0160.00518.35
8.2.20.0200.00718.13
8.2.10.0230.00618.08
8.2.00.0220.00818.01
8.1.330.0110.00721.61
8.1.320.0130.00816.16
8.1.310.0180.00416.64
8.1.300.0190.00917.38
8.1.290.0190.00523.46
8.1.280.0150.00821.01
8.1.270.0190.00819.78
8.1.260.0200.00819.89
8.1.250.0160.00419.81
8.1.240.0150.00718.16
8.1.230.0130.01117.86
8.1.220.0170.00318.13
8.1.210.0130.00717.87
8.1.200.0150.00317.98
8.1.190.0110.00617.89
8.1.180.0170.00217.73
8.1.170.0160.00617.99
8.1.160.0130.00717.88
8.1.150.0150.00518.11
8.1.140.0140.00517.84
8.1.130.0180.00617.86
8.1.120.0160.00717.98
8.1.110.0140.00618.07
8.1.100.0120.01518.62
8.1.90.0180.00617.94
8.1.80.0150.00918.53
8.1.70.0140.00518.08
8.1.60.0110.00518.16
8.1.50.0160.00817.97
8.1.40.0160.00618.23
8.1.30.0180.00918.28
8.1.20.0110.00718.81
8.1.10.0130.01018.06
8.1.00.0150.00618.02

preferences:
29.64 ms | 403 KiB | 5 Q