3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "oAA34Ao#\\\\ooo/"; echo preg_replace_callback( '/([\x00-\x1F\*\(\)\\\\])/', function ($matches) { return "\\".join("", unpack("H2", $matches[1])); }, $str ); $str = "oAA34Ao#\\\\ooo/"; function matches($matches) { return "\\".join("", unpack("H2", $matches[1])); } echo ' ' . mb_ereg_replace_callback( '([\x00-\x1F\*\(\)\\\\])', "matches", $str ); ?>

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.00618.81
8.3.50.0090.00722.11
8.3.40.0030.01218.98
8.3.30.0100.01020.29
8.3.20.0080.00020.47
8.3.10.0000.00721.92
8.3.00.0040.00422.49
8.2.180.0060.01216.88
8.2.170.0060.01122.96
8.2.160.0060.00920.53
8.2.150.0070.00024.18
8.2.140.0030.00624.66
8.2.130.0070.00726.16
8.2.120.0080.00019.79
8.2.110.0060.00320.39
8.2.100.0090.00318.03
8.2.90.0040.00419.30
8.2.80.0000.00819.39
8.2.70.0040.00417.88
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0080.00018.41
8.2.30.0080.00018.20
8.2.20.0040.00417.89
8.2.10.0040.00418.12
8.2.00.0060.00518.15
8.1.280.0060.01225.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0040.00820.81
8.1.220.0050.00317.89
8.1.210.0080.00018.77
8.1.200.0050.00517.61
8.1.190.0000.00817.53
8.1.180.0080.00018.10
8.1.170.0060.00318.81
8.1.160.0000.00822.29
8.1.150.0040.00418.84
8.1.140.0000.00917.69
8.1.130.0040.00417.90
8.1.120.0030.00617.80
8.1.110.0000.00817.81
8.1.100.0040.00417.77
8.1.90.0040.00417.79
8.1.80.0040.00417.77
8.1.70.0070.00017.75
8.1.60.0000.00817.90
8.1.50.0070.00017.87
8.1.40.0050.00317.82
8.1.30.0040.00417.96
8.1.20.0080.00017.93
8.1.10.0000.00817.93
8.1.00.0040.00417.82
8.0.300.0000.00718.77
8.0.290.0000.00717.30
8.0.280.0000.00718.59
8.0.270.0030.00317.43
8.0.260.0030.00317.05
8.0.250.0030.00317.20
8.0.240.0060.00317.25
8.0.230.0040.00417.25
8.0.220.0050.00517.13
8.0.210.0040.00317.07
8.0.200.0030.00317.22
8.0.190.0000.00717.23
8.0.180.0050.00317.14
8.0.170.0040.00417.15
8.0.160.0000.00717.16
8.0.150.0030.00517.11
8.0.140.0000.00817.14
8.0.130.0060.00013.60
8.0.120.0050.00317.21
8.0.110.0040.00417.20
8.0.100.0070.00017.28
8.0.90.0040.00417.28
8.0.80.0060.00917.26
8.0.70.0040.00417.00
8.0.60.0000.00717.19
8.0.50.0000.00817.19
8.0.30.0110.01117.55
8.0.20.0100.00917.59
8.0.10.0000.00717.26
8.0.00.0050.00817.14
7.4.330.0050.00015.00
7.4.320.0030.00316.71
7.4.300.0040.00416.80
7.4.290.0070.00016.91
7.4.280.0030.00316.93
7.4.270.0030.00316.88
7.4.260.0000.00717.00
7.4.250.0030.00516.84
7.4.240.0000.00816.97
7.4.230.0000.00716.64
7.4.220.0110.00616.97
7.4.210.0060.00916.96
7.4.200.0040.00416.60
7.4.190.0040.00416.72
7.4.160.0080.00816.72
7.4.150.0080.01217.40
7.4.140.0070.01117.86
7.4.130.0020.01616.78
7.4.120.0070.01016.79
7.4.110.0060.00916.88
7.4.100.0090.00916.80
7.4.90.0060.01216.88
7.4.80.0070.01019.39
7.4.70.0060.01016.64
7.4.60.0080.00816.93
7.4.50.0060.00316.64
7.4.40.0070.01022.77
7.4.30.0060.01216.94
7.4.00.0120.00415.07
7.3.330.0050.00013.59
7.3.320.0020.00213.50
7.3.310.0040.00416.75
7.3.300.0050.00216.56
7.3.290.0030.01016.60
7.3.280.0080.01116.56
7.3.270.0130.00917.40
7.3.260.0100.01016.64
7.3.250.0080.00816.62
7.3.240.0190.00616.61
7.3.230.0130.00316.51
7.3.210.0150.00616.67
7.3.200.0150.00319.39
7.3.190.0120.00616.61
7.3.180.0100.00716.63
7.3.170.0060.00916.46
7.3.160.0030.01316.73
7.3.120.0120.00315.28
7.2.330.0030.01416.80
7.2.320.0140.00816.79
7.2.310.0140.00316.78
7.2.300.0130.00316.78
7.2.290.0090.00616.95
7.2.60.0060.00917.04
7.2.00.0030.00919.80
7.1.200.0030.00915.85
7.1.100.0030.00718.46
7.1.70.0000.01617.49
7.1.60.0100.01419.21
7.1.50.0120.01217.17
7.1.00.0070.04722.59
7.0.200.0180.00314.98
7.0.140.0070.07322.18
7.0.60.0170.06719.97
7.0.50.0070.04317.86
7.0.40.0030.04720.26
7.0.30.0200.04720.22
7.0.20.0170.04320.26
7.0.10.0070.08320.46
7.0.00.0030.04020.21
5.6.210.0130.07720.48
5.6.200.0070.07018.19
5.6.190.0100.07320.46
5.6.180.3930.04320.42
5.6.170.0230.04020.53
5.6.160.0100.07020.46
5.6.150.0070.08318.28
5.6.140.0000.07318.18
5.6.130.0100.07318.29
5.6.120.0000.08721.04
5.6.110.0130.07021.14
5.6.100.0070.08021.05
5.6.90.0130.06321.01
5.6.80.0070.06720.54
5.5.350.0300.07720.39
5.5.340.0070.05018.08
5.5.330.0070.04020.32
5.5.320.0300.05720.28
5.5.310.0330.08020.19
5.5.300.0000.07718.07
5.5.290.0100.03317.97
5.5.280.0100.08320.78
5.5.270.0070.04320.86
5.5.260.0030.08720.73
5.5.250.0000.08020.66
5.5.240.0370.06020.38
5.4.450.0670.05019.33
5.4.440.0470.06019.59
5.4.430.0170.05319.54
5.4.420.0300.05019.55
5.4.410.0070.05718.73
5.4.400.0230.05718.74
5.4.390.0370.04718.63
5.4.380.0870.05018.48
5.4.370.0100.05318.86
5.4.360.0130.05018.73
5.4.350.0050.04812.02
5.4.340.0060.04212.02
5.4.320.0080.04012.50
5.4.310.0040.04012.51
5.4.300.0050.04612.51
5.4.290.0040.04212.50
5.4.280.0050.04012.40
5.4.270.0060.03512.40
5.4.260.0080.04312.40
5.4.250.0070.05318.75
5.4.240.0030.05718.96
5.4.230.0030.06018.95
5.4.220.0100.05319.00
5.4.210.0130.05018.91
5.4.200.0070.05318.67
5.4.190.0070.05019.00
5.4.180.0000.05719.02
5.4.170.0030.06318.83
5.4.160.0030.08318.93
5.4.150.0070.05719.01
5.4.140.0070.05716.45
5.4.130.0100.05316.63
5.4.120.0200.05716.59
5.4.110.0070.05316.54
5.4.100.0130.06016.42
5.4.90.0100.05716.52
5.4.80.0100.04316.55
5.4.70.0030.08016.66
5.4.60.0100.06316.54
5.4.50.0100.05716.36
5.4.40.0070.04716.68
5.4.30.0000.05316.50
5.4.20.0170.05316.56
5.4.10.0070.05316.50
5.4.00.0070.04715.86
5.3.290.0080.04012.80
5.3.280.0130.04714.51
5.3.270.0130.04714.60
5.3.260.0070.05714.69
5.3.250.0070.06314.79
5.3.240.0100.05314.77
5.3.230.0070.07314.51
5.3.220.0030.05314.71
5.3.210.0070.05314.79
5.3.200.0070.05014.75
5.3.190.0070.06014.55
5.3.180.0170.04014.40
5.3.170.0070.07314.57
5.3.160.0030.05314.56
5.3.150.0070.05014.54
5.3.140.0070.05014.65
5.3.130.0130.04714.55
5.3.120.0070.07014.64
5.3.110.0030.05714.72
5.3.100.0070.05014.12
5.3.90.0070.07314.00
5.3.80.0100.04714.18
5.3.70.0130.04314.13
5.3.60.0100.05314.22
5.3.50.0130.04313.96
5.3.40.0030.05314.04
5.3.30.0100.04314.10
5.3.20.0030.05013.78
5.3.10.0030.06013.56
5.3.00.0130.04713.48
5.2.170.0000.04711.15
5.2.160.0070.04011.23
5.2.150.0070.04311.29
5.2.140.0100.05711.16
5.2.130.0130.05011.03
5.2.120.0030.04011.21
5.2.110.0070.05711.11
5.2.100.0100.05311.03
5.2.90.0130.05011.12
5.2.80.0000.05011.24
5.2.70.0100.04011.01
5.2.60.0070.05010.97
5.2.50.0030.05311.11
5.2.40.0130.03311.15
5.2.30.0070.05310.81
5.2.20.0070.04011.07
5.2.10.0070.03710.94
5.2.00.0100.03310.70
5.1.60.0130.0239.88
5.1.50.0070.0409.84
5.1.40.0070.0309.86
5.1.30.0030.03710.25
5.1.20.0100.03310.25
5.1.10.0070.03310.25
5.1.00.0030.03710.13
5.0.50.0070.0238.47
5.0.40.0070.0238.47
5.0.30.0070.0478.24
5.0.20.0070.0378.23
5.0.10.0030.0278.25
5.0.00.0030.0538.07
4.4.90.0100.0137.43
4.4.80.0000.0277.43
4.4.70.0030.0207.43
4.4.60.0070.0277.43
4.4.50.0000.0237.43
4.4.40.0030.0337.43
4.4.30.0070.0177.43
4.4.20.0100.0137.43
4.4.10.0070.0207.43
4.4.00.0000.0337.43
4.3.110.0030.0207.43
4.3.100.0000.0237.43
4.3.90.0070.0137.43
4.3.80.0000.0337.43
4.3.70.0030.0207.43
4.3.60.0030.0177.43
4.3.50.0030.0207.43
4.3.40.0070.0277.43
4.3.30.0000.0237.43
4.3.20.0070.0177.43
4.3.10.0000.0237.43
4.3.00.0170.0177.28

preferences:
49.55 ms | 400 KiB | 5 Q