3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "oAA34Ao#\\\\oo+--)o/"; echo preg_replace_callback( '/([\x00-\x1F\*\(\)\\\\])/', function ($matches) { $x = "\\".join("", unpack("H2", $matches[1])); echo $x; return $x; }, $str ); $str = "oAA34Ao#\\\\oo+--)o/"; function matches($matches) { $x = "\\".join("", unpack("H2", $matches[1])); echo $x; return $x; } 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.0090.01218.81
8.3.50.0050.01321.33
8.3.40.0120.00318.96
8.3.30.0100.00320.34
8.3.20.0140.00020.34
8.3.10.0000.00822.17
8.3.00.0000.00822.43
8.2.180.0090.00618.54
8.2.170.0110.00422.96
8.2.160.0070.00720.30
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.89
8.2.110.0060.00322.37
8.2.100.0040.00719.39
8.2.90.0060.00319.40
8.2.80.0000.00719.28
8.2.70.0030.00617.88
8.2.60.0120.00017.93
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0040.00418.20
8.2.20.0020.00518.07
8.2.10.0040.00418.08
8.2.00.0000.00918.02
8.1.280.0160.00625.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.75
8.1.230.0040.00719.12
8.1.220.0060.00317.77
8.1.210.0040.00418.77
8.1.200.0030.00617.47
8.1.190.0050.00317.66
8.1.180.0000.00820.38
8.1.170.0030.00618.84
8.1.160.0040.00422.16
8.1.150.0040.00418.95
8.1.140.0080.00017.73
8.1.130.0040.00417.96
8.1.120.0030.00617.76
8.1.110.0040.00417.75
8.1.100.0000.00917.82
8.1.90.0040.00417.77
8.1.80.0040.00417.75
8.1.70.0000.00717.74
8.1.60.0030.00617.93
8.1.50.0000.00817.88
8.1.40.0050.00317.81
8.1.30.0000.00817.80
8.1.20.0040.00417.96
8.1.10.0050.00317.83
8.1.00.0050.00317.78
8.0.300.0000.00718.77
8.0.290.0000.00717.30
8.0.280.0070.00018.50
8.0.270.0050.00317.30
8.0.260.0030.00317.07
8.0.250.0070.00017.10
8.0.240.0000.00817.20
8.0.230.0040.00417.23
8.0.220.0000.00717.04
8.0.210.0070.00017.19
8.0.200.0040.00417.24
8.0.190.0070.00017.25
8.0.180.0050.00217.07
8.0.170.0030.00517.15
8.0.160.0000.00817.18
8.0.150.0000.00717.16
8.0.140.0040.00417.02
8.0.130.0000.00613.58
8.0.120.0050.00317.14
8.0.110.0000.00717.16
8.0.100.0040.00417.23
8.0.90.0000.00717.18
8.0.80.0120.00317.07
8.0.70.0040.00417.10
8.0.60.0040.00417.34
8.0.50.0020.00517.22
8.0.30.0170.01017.35
8.0.20.0130.00617.50
8.0.10.0070.00017.07
8.0.00.0080.01116.94
7.4.330.0000.00515.00
7.4.320.0030.00316.94
7.4.300.0030.00316.83
7.4.290.0030.00316.69
7.4.280.0050.00216.74
7.4.270.0000.00716.91
7.4.260.0070.00016.81
7.4.250.0040.00416.75
7.4.240.0030.00316.88
7.4.230.0040.00416.71
7.4.220.0090.00916.94
7.4.210.0070.00716.96
7.4.200.0070.00016.68
7.4.190.0030.00317.02
7.4.160.0050.01116.64
7.4.150.0100.00717.40
7.4.140.0140.00917.86
7.4.130.0140.00516.77
7.4.120.0060.01116.71
7.4.110.0060.01116.79
7.4.100.0100.00916.76
7.4.90.0100.00716.96
7.4.80.0050.01419.39
7.4.70.0080.01216.94
7.4.60.0130.01016.70
7.4.50.0000.00516.50
7.4.40.0060.00622.77
7.4.30.0060.01116.86
7.4.00.0110.00715.13
7.3.330.0000.00513.64
7.3.320.0060.00013.64
7.3.310.0080.00016.52
7.3.300.0040.00416.57
7.3.290.0100.00416.57
7.3.280.0070.01016.57
7.3.270.0100.01017.40
7.3.260.0040.01516.79
7.3.250.0080.01016.64
7.3.240.0120.00616.62
7.3.230.0100.00716.82
7.3.210.0180.00616.77
7.3.200.0030.01319.39
7.3.190.0090.00916.45
7.3.180.0080.00816.77
7.3.170.0100.01016.86
7.3.160.0060.01016.41
7.3.120.0080.00815.03
7.3.110.0100.01015.02
7.3.100.0100.00715.18
7.3.90.0100.00315.09
7.3.80.0040.01115.32
7.3.70.0040.00814.93
7.3.60.0100.00714.93
7.3.50.0110.00315.13
7.3.40.0000.01815.21
7.3.30.0040.00815.19
7.3.20.0060.00916.98
7.3.10.0110.00416.94
7.3.00.0070.01016.75
7.2.330.0150.00416.85
7.2.320.0120.01216.72
7.2.310.0090.00916.75
7.2.300.0060.01016.85
7.2.290.0070.01016.90
7.2.250.0120.00615.32
7.2.240.0070.01315.29
7.2.230.0070.00715.39
7.2.220.0000.01115.30
7.2.210.0110.00714.99
7.2.200.0070.01015.07
7.2.190.0030.01015.03
7.2.180.0070.01015.34
7.2.170.0030.00715.21
7.2.160.0100.00615.21
7.2.150.0070.01017.15
7.2.140.0030.01317.07
7.2.130.0140.00316.82
7.2.120.0060.00917.27
7.2.110.0070.01117.13
7.2.100.0080.00417.14
7.2.90.0040.01117.10
7.2.80.0080.00817.07
7.2.70.0040.01416.82
7.2.60.0050.01017.14
7.2.50.0070.01017.03
7.2.40.0040.01117.22
7.2.30.0090.00617.20
7.2.20.0040.00716.96
7.2.10.0040.01217.10
7.2.00.0080.00518.31
7.1.330.0070.01015.90
7.1.320.0030.00716.02
7.1.310.0080.00016.19
7.1.300.0110.00015.83
7.1.290.0030.01415.90
7.1.280.0030.01316.09
7.1.270.0000.01315.70
7.1.260.0060.01015.84
7.1.250.0120.00316.04
7.1.240.0030.01115.84
7.1.230.0100.00716.09
7.1.220.0000.01516.14
7.1.210.0060.00916.14
7.1.200.0020.00916.10
7.1.190.0190.00016.07
7.1.180.0090.00615.66
7.1.170.0060.00916.13
7.1.160.0070.00716.03
7.1.150.0110.00416.10
7.1.140.0080.00415.89
7.1.130.0060.00615.80
7.1.120.0000.01415.95
7.1.110.0030.01315.87
7.1.100.0020.01217.27
7.1.90.0000.01315.94
7.1.80.0060.00616.08
7.1.70.0070.00516.62
7.1.60.0070.01417.61
7.1.50.0050.01416.60
7.1.40.0030.00715.75
7.1.30.0060.00915.77
7.1.20.0040.01015.95
7.1.10.0030.01215.90
7.1.00.0030.04119.12
7.0.330.0090.00315.66
7.0.320.0000.01215.68
7.0.310.0030.01415.51
7.0.300.0100.00615.50
7.0.290.0030.00615.47
7.0.280.0060.00815.59
7.0.270.0120.00315.32
7.0.260.0030.01315.59
7.0.250.0110.00415.43
7.0.240.0060.01015.66
7.0.230.0000.01415.79
7.0.220.0030.01015.73
7.0.210.0070.00315.75
7.0.200.0160.00415.19
7.0.190.0090.00615.69
7.0.180.0030.00715.21
7.0.170.0040.00715.69
7.0.160.0040.00815.64
7.0.150.0030.00715.52
7.0.140.0020.04418.84
7.0.130.0030.01015.64
7.0.120.0130.00015.36
7.0.110.0040.00815.30
7.0.100.0030.02817.64
7.0.90.0030.02817.65
7.0.80.0100.01817.85
7.0.70.0030.02617.83
7.0.60.0070.01517.72
7.0.50.0030.02518.03
7.0.40.0070.02316.87
7.0.30.0000.02717.00
7.0.20.0050.03916.81
7.0.10.0080.04116.96
7.0.00.0100.04016.90
5.6.400.0090.00614.60
5.6.390.0090.00014.61
5.6.380.0090.00314.34
5.6.370.0080.01114.23
5.6.360.0090.00014.29
5.6.350.0110.00314.70
5.6.340.0150.00014.40
5.6.330.0120.00314.60
5.6.320.0030.01214.68
5.6.310.0100.00014.21
5.6.300.0100.00714.59
5.6.290.0080.00814.31
5.6.280.0040.04217.65
5.6.270.0060.00614.42
5.6.260.0000.01214.34
5.6.250.0050.02217.67
5.6.240.0000.03417.61
5.6.230.0050.02317.67
5.6.220.0060.02017.72
5.6.210.0050.02517.36
5.6.200.0110.02117.83
5.6.190.0070.02117.60
5.6.180.0030.02117.72
5.6.170.0030.04017.65
5.6.160.0070.04717.84
5.6.150.0020.04517.77
5.6.140.0000.04717.91
5.6.130.0050.04617.66
5.6.120.0030.04517.91
5.6.110.0100.04417.70
5.6.100.0130.04017.78
5.6.90.0030.05017.63
5.6.80.0090.04117.33
5.6.70.0120.04217.40
5.6.60.0070.04417.42
5.6.50.0090.02817.46
5.6.40.0110.03817.50
5.6.30.0060.03417.40
5.6.20.0070.04217.47
5.6.10.0070.04817.41
5.6.00.0030.02817.48
5.5.380.0060.02317.48
5.5.370.0050.02317.51
5.5.360.0050.02117.42
5.5.350.0030.02517.34
5.5.340.0070.02317.61
5.5.330.0050.01917.73
5.5.320.0030.02717.56
5.5.310.0100.04317.46
5.5.300.0070.04317.69
5.5.290.0100.04317.63
5.5.280.0110.03717.70
5.5.270.0050.04717.71
5.5.260.0100.04517.67
5.5.250.0010.02917.56
5.5.240.0040.02717.30
5.5.230.0050.03717.17
5.5.220.0000.04817.35
5.5.210.0080.04317.28
5.5.200.0100.02317.31
5.5.190.0030.03017.03
5.5.180.0050.04817.29
5.5.170.0070.00714.08
5.5.160.0030.04517.26
5.5.150.0070.02517.23
5.5.140.0050.03517.30
5.5.130.0070.03417.14
5.5.120.0070.02717.31
5.5.110.0070.04017.37
5.5.100.0080.03717.11
5.5.90.0090.02217.25
5.5.80.0020.04317.14
5.5.70.0070.04017.09
5.5.60.0050.03817.25
5.5.50.0040.04617.06
5.5.40.0080.04317.18
5.5.30.0030.04217.25
5.5.20.0030.04217.16
5.5.10.0050.04517.29
5.5.00.0040.03417.15
5.4.450.0080.03816.36
5.4.440.0110.03416.21
5.4.430.0070.04016.25
5.4.420.0040.04616.32
5.4.410.0080.03816.11
5.4.400.0080.03716.16
5.4.390.0100.03816.11
5.4.380.0080.04316.21
5.4.370.0050.04516.20
5.4.360.0110.03716.17
5.4.350.0070.02816.20
5.4.340.0010.04416.11
5.4.330.0040.00813.18
5.4.320.0050.04716.15
5.4.310.0020.03916.21
5.4.300.0030.04016.11
5.4.290.0080.03616.06
5.4.280.0020.04216.19
5.4.270.0050.03016.04
5.4.260.0060.02316.06
5.4.250.0050.03516.15
5.4.240.0070.03816.12
5.4.230.0030.04116.06
5.4.220.0080.03816.19
5.4.210.0080.03416.10
5.4.200.0090.03816.17
5.4.190.0030.04316.13
5.4.180.0050.02316.15
5.4.170.0050.03516.02
5.4.160.0050.04216.10
5.4.150.0100.03216.03
5.4.140.0080.03614.81
5.4.130.0070.03314.73
5.4.120.0090.03514.82
5.4.110.0080.03814.87
5.4.100.0020.04514.83
5.4.90.0050.04314.87
5.4.80.0070.03614.84
5.4.70.0120.03414.82
5.4.60.0090.03714.83
5.4.50.0080.03714.79
5.4.40.0080.03714.78
5.4.30.0050.04114.82
5.4.20.0060.03714.78
5.4.10.0040.04014.80
5.4.00.0050.03714.54
5.3.290.0050.03813.91
5.3.280.0020.04813.88
5.3.270.0060.04013.87
5.3.260.0030.04113.91
5.3.250.0080.02313.92
5.3.240.0050.03813.88
5.3.230.0030.04513.95
5.3.220.0020.04713.94
5.3.210.0050.02713.87
5.3.200.0100.03013.90
5.3.190.0060.02313.93
5.3.180.0030.02413.88
5.3.170.0050.03813.85
5.3.160.0100.03613.83
5.3.150.0070.04213.91
5.3.140.0090.03313.89
5.3.130.0080.03613.86
5.3.120.0010.04313.93
5.3.110.0100.03513.85
5.3.100.0050.03813.61
5.3.90.0050.03513.66
5.3.80.0070.04113.65
5.3.70.0060.03513.63
5.3.60.0050.03813.66
5.3.50.0070.01813.55
5.3.40.0040.04213.64
5.3.30.0080.02713.58
5.3.20.0090.03513.39
5.3.10.0060.02613.46
5.3.00.0080.02813.46
5.2.170.0100.04011.12
5.2.160.0070.06011.14
5.2.150.0030.05711.06
5.2.140.0000.04711.18
5.2.130.0000.06311.05
5.2.120.0070.04311.04
5.2.110.0030.03011.14
5.2.100.0030.06310.93
5.2.90.0000.06311.05
5.2.80.0030.05011.08
5.2.70.0030.06710.95
5.2.60.0070.04011.04
5.2.50.0070.04010.83
5.2.40.0070.05010.99
5.2.30.0230.01710.96
5.2.20.0030.03310.81
5.2.10.0000.03710.91
5.2.00.0070.06310.66
5.1.60.0070.0439.98
5.1.50.0070.0409.99
5.1.40.0000.05710.00
5.1.30.0070.05310.41
5.1.20.0000.03010.28
5.1.10.0030.04710.13
5.1.00.0070.0309.90
5.0.50.0100.0408.64
5.0.40.0000.0508.64
5.0.30.0000.0408.64
5.0.20.0070.0438.64
5.0.10.0100.0378.64
5.0.00.0030.0678.64
4.4.90.0000.0338.64
4.4.80.0030.0138.64
4.4.70.0000.0378.64
4.4.60.0000.0308.64
4.4.50.0070.0338.64
4.4.40.0000.0308.64
4.4.30.0000.0338.64
4.4.20.0000.0378.64
4.4.10.0000.0408.64
4.4.00.0030.0508.64
4.3.110.0000.0338.64
4.3.100.0030.0278.64
4.3.90.0000.0238.64
4.3.80.0100.0438.64
4.3.70.0000.0338.64
4.3.60.0030.0338.64
4.3.50.0030.0378.64
4.3.40.0000.0538.64
4.3.30.0000.0378.64
4.3.20.0030.0378.64
4.3.10.0000.0408.64
4.3.00.0030.0338.64

preferences:
47.34 ms | 404 KiB | 6 Q