3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "123@456asdf7896"; $numbers = preg_replace('/\D/', '', $data); ?> $phone_num = '('.substr($numbers, 0, 3).') '.substr($numbers, 3, 3).'-'.substr($numbers,6); echo $phone_num;

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.60.0140.00418.08
8.3.50.0170.00316.75
8.3.40.0120.00618.83
8.3.30.0170.00318.79
8.3.20.0040.00421.86
8.3.10.0000.00821.78
8.3.00.0080.00019.14
8.2.180.0110.00718.54
8.2.170.0090.00622.96
8.2.160.0150.00322.09
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00420.54
8.2.120.0000.00826.35
8.2.110.0130.01022.07
8.2.100.0060.00717.88
8.2.90.0030.00519.17
8.2.80.0040.00417.97
8.2.70.0030.00517.75
8.2.60.0030.00517.80
8.2.50.0080.00018.10
8.2.40.0000.00820.42
8.2.30.0000.00921.00
8.2.20.0030.00518.01
8.2.10.0000.00818.18
8.2.00.0040.00417.98
8.1.280.0070.00725.92
8.1.270.0000.00722.19
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0120.00923.81
8.1.230.0100.00024.04
8.1.220.0030.00717.74
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0040.00417.23
8.1.180.0050.00518.10
8.1.170.0040.00418.64
8.1.160.0000.00818.89
8.1.150.0040.00418.85
8.1.140.0000.00719.47
8.1.130.0030.00318.85
8.1.120.0000.00717.57
8.1.110.0080.00017.47
8.1.100.0030.00517.51
8.1.90.0040.00417.58
8.1.80.0000.00717.56
8.1.70.0000.00717.53
8.1.60.0070.00017.68
8.1.50.0040.00417.55
8.1.40.0000.00817.59
8.1.30.0040.00417.71
8.1.20.0030.00617.61
8.1.10.0000.00817.63
8.1.00.0040.00417.58
8.0.300.0050.00318.77
8.0.290.0050.00316.88
8.0.280.0070.00018.48
8.0.270.0050.00216.98
8.0.260.0000.00718.80
8.0.250.0030.00317.02
8.0.240.0060.00617.05
8.0.230.0000.00717.06
8.0.220.0030.00516.93
8.0.210.0030.00316.85
8.0.200.0030.00317.05
8.0.190.0040.00417.07
8.0.180.0000.00717.00
8.0.170.0070.00017.02
8.0.160.0030.00316.95
8.0.150.0030.00316.93
8.0.140.0080.00016.84
8.0.130.0000.00513.33
8.0.120.0050.00316.98
8.0.110.0030.00517.04
8.0.100.0060.00316.82
8.0.90.0080.00016.99
8.0.80.0070.00816.98
8.0.70.0050.00216.99
8.0.60.0040.00417.02
8.0.50.0070.00017.09
8.0.30.0090.01117.32
8.0.20.0110.00917.40
8.0.10.0000.00717.01
8.0.00.0110.00716.67
7.4.330.0000.00515.55
7.4.320.0040.00416.75
7.4.300.0030.00316.78
7.4.290.0030.00316.63
7.4.280.0030.00616.63
7.4.270.0060.00016.54
7.4.260.0050.00013.42
7.4.250.0070.00016.61
7.4.240.0030.00316.68
7.4.230.0020.00516.86
7.4.220.0070.01316.69
7.4.210.0060.00916.77
7.4.200.0040.00416.55
7.4.160.0070.00916.70
7.4.150.0040.01417.40
7.4.140.0080.01017.86
7.4.130.0130.00616.69
7.4.120.0100.00916.67
7.4.110.0190.00316.42
7.4.100.0130.00316.48
7.4.90.0120.00616.88
7.4.80.0110.00619.39
7.4.70.0120.00416.54
7.4.60.0030.01316.81
7.4.50.0040.01516.60
7.4.40.0040.01816.54
7.4.30.0080.00716.56
7.4.10.0110.00014.79
7.4.00.0080.01015.03
7.3.330.0000.00713.21
7.3.320.0030.00313.09
7.3.310.0050.00216.39
7.3.300.0060.00016.15
7.3.290.0060.00916.29
7.3.280.0080.00916.28
7.3.270.0100.00717.40
7.3.260.0110.00716.22
7.3.250.0140.00716.47
7.3.240.0100.00616.44
7.3.230.0080.00816.30
7.3.210.0030.01316.57
7.3.200.0080.00816.60
7.3.190.0120.00616.25
7.3.180.0070.01016.38
7.3.170.0060.01016.64
7.3.160.0080.00816.40
7.3.130.0040.01414.75
7.3.120.0040.01214.36
7.3.110.0100.00615.01
7.3.100.0040.01214.96
7.3.90.0000.01314.54
7.3.80.0040.01115.05
7.3.70.0030.01314.91
7.3.60.0040.00414.89
7.3.50.0110.00014.75
7.3.40.0000.01014.46
7.3.30.0000.01414.69
7.3.20.0070.00316.57
7.3.10.0040.00816.62
7.3.00.0050.00916.45
7.2.330.0100.00716.59
7.2.320.0000.01916.59
7.2.310.0120.01216.86
7.2.300.0040.01716.64
7.2.290.0070.01516.55
7.2.260.0100.00715.07
7.2.250.0060.01215.16
7.2.240.0070.00715.13
7.2.230.0120.00615.16
7.2.220.0060.00614.84
7.2.210.0040.01114.90
7.2.200.0060.00314.98
7.2.190.0070.00315.09
7.2.180.0000.01314.74
7.2.170.0060.01014.95
7.2.160.0070.01114.77
7.2.150.0060.00617.11
7.2.140.0060.00916.82
7.2.130.0090.00716.94
7.2.120.0020.01416.58
7.2.110.0130.00716.79
7.2.100.0050.01016.78
7.2.90.0090.00916.63
7.2.80.0140.00516.73
7.2.70.0020.01416.92
7.2.60.0290.00816.18
7.2.50.0170.00416.87
7.2.40.0140.00416.83
7.2.30.0120.00617.00
7.2.20.0100.01416.78
7.2.10.0140.00616.75
7.2.00.0120.01017.74
7.1.330.0080.00615.84
7.1.320.0100.00315.54
7.1.310.0070.00615.94
7.1.300.0030.00615.84
7.1.290.0040.01116.08
7.1.280.0070.00415.79
7.1.270.0040.00715.81
7.1.260.0040.00415.63
7.1.250.0110.00315.81
7.1.240.0030.00815.55
7.1.230.0060.00315.84
7.1.220.0000.00915.83
7.1.210.0090.00615.80
7.1.200.0040.00815.87
7.1.190.0030.01015.94
7.1.180.0040.00415.52
7.1.170.0070.00415.93
7.1.160.0040.00415.91
7.1.150.0060.00615.75
7.1.140.0100.00715.82
7.1.130.0000.00815.63
7.1.120.0060.00615.77
7.1.110.0030.00915.96
7.1.100.0040.00617.11
7.1.90.0040.00716.06
7.1.80.0060.00315.33
7.1.70.0070.00316.54
7.1.60.0450.00924.65
7.1.50.0500.00824.47
7.1.40.0320.01724.17
7.1.30.0350.01824.24
7.1.20.0460.00824.41
7.1.10.0420.01215.35
7.1.00.0360.01115.47
7.0.330.0120.00015.38
7.0.320.0070.00715.51
7.0.310.0000.01015.36
7.0.300.0060.00615.12
7.0.290.0060.00315.61
7.0.280.0030.01015.42
7.0.270.0090.00415.47
7.0.260.0000.01415.45
7.0.250.0090.00315.60
7.0.240.0060.00315.34
7.0.230.0100.00615.54
7.0.220.0030.00715.46
7.0.210.0040.00715.54
7.0.200.0250.00915.30
7.0.190.0360.01115.35
7.0.180.0240.00814.94
7.0.170.0390.01015.12
7.0.160.0420.01514.98
7.0.150.0120.00614.66
7.0.140.0370.00715.09
7.0.130.0580.01315.27
7.0.120.0390.00615.25
7.0.110.0380.01315.07
7.0.100.0370.01214.92
7.0.90.0350.01415.13
7.0.80.0470.01215.13
7.0.70.0450.01115.05
7.0.60.0330.01215.12
7.0.50.0400.01114.98
7.0.40.0470.00914.15
7.0.30.0420.01414.24
7.0.20.0450.01014.18
7.0.10.0480.00614.00
7.0.00.0420.00614.11
5.6.400.0110.00014.41
5.6.390.0100.00714.48
5.6.380.0000.01414.29
5.6.370.0040.00814.05
5.6.360.0060.00613.97
5.6.350.0100.00314.53
5.6.340.0120.00413.97
5.6.330.0060.00714.63
5.6.320.0060.00914.32
5.6.310.0040.00714.37
5.6.300.0060.00914.18
5.6.290.0070.00714.43
5.6.280.0070.00314.05
5.6.270.0100.00314.26
5.6.260.0070.01314.27
5.6.250.0030.01214.46
5.6.240.0040.01414.39
5.6.230.0070.00714.54
5.6.220.0110.00314.34
5.6.210.0170.00014.01
5.6.200.0030.01014.41
5.6.190.0060.00614.27
5.6.180.0080.00614.21
5.6.170.0000.01214.36
5.6.160.0070.00714.27
5.6.150.0070.01014.54
5.6.140.0060.00914.56
5.6.130.0070.00714.43
5.6.120.0060.01014.10
5.6.110.0120.00014.45
5.6.100.0140.00014.27
5.6.90.0100.00714.25
5.6.80.0090.00614.09
5.6.70.0030.00914.53
5.6.60.0090.00614.21
5.6.50.0120.00313.94
5.6.40.0120.00014.13
5.6.30.0060.00714.45
5.6.20.0030.01314.18
5.6.10.0060.00614.09
5.6.00.0040.01114.27

preferences:
67.68 ms | 401 KiB | 5 Q