3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash = '4dff4ea340f0a823f15d3f4f01ab62eae05da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a'; //^ Indica o inicio do texto //(.{n}) Captura os próximos n caracteres. //(.+)$ Captura os caracteres restantes até o final do texto. $pattern = '/^(.{8})(.{4})(.{4})(.{4})(.+)$/'; // $n.. representa cada um dos grupos entre parenteses, onde n indica a posição do grupo no $pattern. $replacement = '$1-$2-$3-$4-$5'; $masked = preg_replace($pattern, $replacement, $hash); echo $masked;

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.0130.00318.56
8.3.50.0040.01418.07
8.3.40.0070.00718.79
8.3.30.0090.00618.79
8.3.20.0080.00018.95
8.3.10.0040.00421.59
8.3.00.0000.00721.60
8.2.180.0100.00716.74
8.2.170.0040.01122.96
8.2.160.0070.00720.96
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.05
8.2.110.0000.00921.30
8.2.100.0110.00017.78
8.2.90.0060.00317.75
8.2.80.0080.00018.79
8.2.70.0080.00417.50
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0070.00018.35
8.2.30.0000.00718.08
8.2.20.0040.00418.14
8.2.10.0040.00418.20
8.2.00.0000.00819.45
8.1.280.0090.00625.92
8.1.270.0040.00420.30
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0030.00619.34
8.1.230.0030.00717.83
8.1.220.0080.00017.77
8.1.210.0080.00018.77
8.1.200.0100.00017.35
8.1.190.0100.00017.25
8.1.180.0080.00018.10
8.1.170.0020.00518.75
8.1.160.0040.00418.84
8.1.150.0000.00718.79
8.1.140.0000.00718.85
8.1.130.0090.00020.01
8.1.120.0040.00417.57
8.1.110.0070.00417.54
8.1.100.0030.00517.43
8.1.90.0080.00017.57
8.1.80.0000.00817.51
8.1.70.0030.00517.50
8.1.60.0040.00417.56
8.1.50.0040.00717.66
8.1.40.0030.00517.66
8.1.30.0000.00817.71
8.1.20.0050.00317.58
8.1.10.0050.00517.56
8.1.00.0000.00817.59
8.0.300.0050.00218.77
8.0.290.0040.00416.88
8.0.280.0000.00718.45
8.0.270.0040.00317.15
8.0.260.0030.00318.52
8.0.250.0000.00916.99
8.0.240.0030.00317.03
8.0.230.0030.00317.07
8.0.220.0000.00916.90
8.0.210.0000.00716.88
8.0.200.0070.00016.93
8.0.190.0080.00016.93
8.0.180.0040.00416.89
8.0.170.0060.00316.91
8.0.160.0050.00316.87
8.0.150.0000.00716.93
8.0.140.0040.00416.93
8.0.130.0030.00313.39
8.0.120.0000.00816.95
8.0.110.0000.00816.97
8.0.100.0040.00417.00
8.0.90.0080.00016.99
8.0.80.0070.00916.97
8.0.70.0040.00416.79
8.0.60.0000.00716.84
8.0.50.0000.00716.93
8.0.30.0070.00917.27
8.0.20.0130.00717.40
8.0.10.0040.00417.09
8.0.00.0080.01016.79
7.4.330.0000.00515.55
7.4.320.0000.00716.57
7.4.300.0030.00316.75
7.4.290.0030.00316.79
7.4.280.0000.00716.65
7.4.270.0030.00316.55
7.4.260.0000.00716.64
7.4.250.0030.00316.70
7.4.240.0080.00016.73
7.4.230.0030.00316.63
7.4.220.0030.00616.82
7.4.210.0060.00916.70
7.4.200.0040.00416.73
7.4.160.0080.01016.67
7.4.140.0100.00917.86
7.4.130.0110.00616.82
7.4.120.0130.00916.61
7.4.110.0090.00916.49
7.4.100.0070.01416.57
7.4.90.0180.00616.62
7.4.80.0070.01019.39
7.4.70.0170.00716.66
7.4.60.0070.01016.71
7.4.50.0060.00916.57
7.4.40.0100.00616.55
7.4.00.0050.01315.21
7.3.330.0000.00513.09
7.3.320.0000.00613.14
7.3.310.0040.00416.19
7.3.300.0030.00316.24
7.3.290.0070.00016.46
7.3.280.0120.00316.29
7.3.260.0110.01016.44
7.3.240.0060.01216.46
7.3.230.0160.00016.81
7.3.210.0160.00616.44
7.3.200.0070.01016.21
7.3.190.0110.00816.53
7.3.180.0060.01016.58
7.3.170.0070.01316.79
7.3.160.0100.00716.36
7.3.120.0100.00714.78
7.3.110.0090.00915.05
7.3.100.0080.00614.98
7.3.90.0050.00815.00
7.3.80.0070.00514.83
7.3.70.0060.00814.84
7.3.60.0090.00715.01
7.3.50.0020.01214.89
7.3.40.0100.00314.74
7.3.30.0090.00314.86
7.3.20.0090.00516.54
7.3.10.0050.01016.62
7.3.00.0110.00716.73
7.2.330.0060.01216.57
7.2.320.0090.00916.71
7.2.310.0170.00016.54
7.2.300.0030.01816.60
7.2.290.0100.00716.71
7.2.250.0040.00815.25
7.2.240.0050.01415.25
7.2.230.0050.01115.18
7.2.220.0070.00815.21
7.2.210.0030.01415.14
7.2.200.0030.00915.11
7.2.190.0020.00814.98
7.2.180.0030.00815.14
7.2.170.0040.01115.03
7.2.160.0030.00714.86
7.2.150.0030.01317.14
7.2.140.0080.00817.11
7.2.130.0070.01117.19
7.2.120.0090.00617.12
7.2.110.0040.00817.04
7.2.100.0410.00315.81
7.2.90.0440.00315.81
7.2.80.0350.01216.02
7.2.70.0490.00616.13
7.2.60.0350.00916.06
7.2.50.0310.01016.13
7.2.40.0490.00616.01
7.2.30.0300.00515.99
7.2.20.0430.00116.11
7.2.10.0390.00916.12
7.2.00.0420.00216.02
7.1.330.0100.00715.93
7.1.320.0030.00615.96
7.1.310.0070.00815.84
7.1.300.0050.00315.83
7.1.290.0030.00815.90
7.1.280.0020.01215.98
7.1.270.0070.00815.88
7.1.260.0040.01115.95
7.1.250.0120.00416.01
7.1.220.0740.00713.89
7.1.210.0660.00714.06
7.1.200.0930.00714.05
7.1.190.0670.00714.17
7.1.180.0670.01313.84
7.1.170.0760.00613.89
7.1.160.0710.00614.13
7.1.150.0570.01014.05
7.1.140.0860.01313.69
7.1.130.0790.00713.89
7.1.120.0600.00314.14
7.1.110.0640.00714.18
7.1.100.0730.00713.99
7.1.90.1560.01314.14
7.1.80.1020.00713.89
7.1.70.0880.00313.91
7.1.60.1180.01331.66
7.1.50.1200.00631.94
7.1.40.1250.01032.09
7.1.30.0750.00631.91
7.1.20.0860.00931.95
7.1.10.0820.00714.03
7.1.00.0970.00714.02

preferences:
37.63 ms | 400 KiB | 5 Q