3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "oAAAoooo"; echo preg_replace_callback( '/([\x00-\x1F\*\(\)\\\\])/', function ($matches) { return "\\".join("", unpack("H2", $matches[1])); }, $str ); $str = "oAAAoooo"; function matches($matches) { return "\\".join("", unpack("H2", $matches[1])); } echo '\n\n\n' . 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.0120.00318.61
8.3.50.0080.01221.33
8.3.40.0190.00318.92
8.3.30.0130.00320.29
8.3.20.0070.00720.29
8.3.10.0070.00722.12
8.3.00.0080.00022.53
8.2.180.0040.01218.79
8.2.170.0070.00718.97
8.2.160.0080.00622.96
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0030.00626.16
8.2.120.0050.00319.54
8.2.110.0060.00322.14
8.2.100.0110.00019.28
8.2.90.0040.00419.17
8.2.80.0000.00819.36
8.2.70.0070.00418.00
8.2.60.0050.00318.05
8.2.50.0050.00318.07
8.2.40.0030.00618.16
8.2.30.0000.00818.25
8.2.20.0040.00417.75
8.2.10.0060.00317.86
8.2.00.0000.01017.95
8.1.280.0090.00625.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.99
8.1.230.0030.00719.21
8.1.220.0030.00517.77
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0040.00417.40
8.1.180.0040.00418.10
8.1.170.0060.00318.86
8.1.160.0040.00422.27
8.1.150.0050.00318.97
8.1.140.0000.00717.68
8.1.130.0030.00517.88
8.1.120.0000.00917.81
8.1.110.0040.00417.77
8.1.100.0080.00017.78
8.1.90.0040.00417.74
8.1.80.0070.00017.73
8.1.70.0000.00717.69
8.1.60.0000.00917.87
8.1.50.0000.00817.84
8.1.40.0080.00017.70
8.1.30.0060.00317.84
8.1.20.0030.00517.86
8.1.10.0030.00617.84
8.1.00.0030.00617.69
8.0.300.0000.00718.77
8.0.290.0070.00017.29
8.0.280.0030.00318.47
8.0.270.0030.00317.41
8.0.260.0040.00417.09
8.0.250.0070.00017.20
8.0.240.0030.00517.29
8.0.230.0000.00817.25
8.0.220.0030.00317.22
8.0.210.0040.00417.23
8.0.200.0050.00317.31
8.0.190.0070.00017.25
8.0.180.0000.00717.21
8.0.170.0030.00517.18
8.0.160.0070.00017.11
8.0.150.0000.00717.07
8.0.140.0040.00417.20
8.0.130.0000.00513.64
8.0.120.0060.00317.18
8.0.110.0050.00317.21
8.0.100.0000.00717.11
8.0.90.0030.00517.25
8.0.80.0070.00717.17
8.0.70.0060.00317.27
8.0.60.0000.00816.98
8.0.50.0050.00217.29
8.0.30.0120.00717.27
8.0.20.0060.01617.41
8.0.10.0050.00217.09
8.0.00.0100.00917.02
7.4.330.0000.00515.00
7.4.320.0060.00016.99
7.4.300.0030.00316.98
7.4.290.0000.00716.99
7.4.280.0070.00016.83
7.4.270.0030.00316.95
7.4.260.0000.00716.96
7.4.250.0040.00416.82
7.4.240.0030.00316.91
7.4.230.0050.00316.68
7.4.220.0100.00716.98
7.4.210.0060.00916.94
7.4.200.0000.00716.69
7.4.190.0000.00717.08
7.4.160.0160.01016.81
7.4.150.0000.01817.40
7.4.140.0120.01117.86
7.4.130.0070.01116.79
7.4.120.0130.00316.94
7.4.110.0130.01016.79
7.4.100.0100.00716.93
7.4.90.0090.01116.52
7.4.80.0160.00319.39
7.4.70.0100.00616.62
7.4.60.0080.00816.77
7.4.50.0040.00016.91
7.4.40.0030.01522.77
7.4.30.0000.01617.00
7.4.00.0000.01515.24
7.3.330.0060.00013.54
7.3.320.0020.00213.50
7.3.310.0040.00416.53
7.3.300.0000.00616.54
7.3.290.0140.00016.52
7.3.280.0090.01216.51
7.3.270.0160.00317.40
7.3.260.0120.00916.65
7.3.250.0100.00816.62
7.3.240.0110.00716.87
7.3.230.0160.00016.58
7.3.210.0120.00816.66
7.3.200.0100.00919.39
7.3.190.0110.00616.59
7.3.180.0090.00616.70
7.3.170.0070.01416.56
7.3.160.0100.00616.68
7.3.120.0060.01015.04
7.3.10.0070.01016.79
7.3.00.0030.01216.84
7.2.330.0100.00616.86
7.2.320.0120.00916.66
7.2.310.0130.00316.63
7.2.300.0150.00316.69
7.2.290.0130.00316.58
7.2.130.0040.01516.95
7.2.120.0130.00616.91
7.2.110.0070.00716.83
7.2.100.0060.00617.07
7.2.90.0060.01017.06
7.2.80.0060.01217.10
7.2.70.0080.01216.96
7.2.60.0120.00917.09
7.2.50.0100.01016.75
7.2.40.0040.01717.05
7.2.30.0130.00717.21
7.2.20.0110.00716.82
7.2.10.0090.01117.02
7.2.00.0030.01218.16
7.1.250.0100.01015.86
7.1.100.0160.00618.25
7.1.70.0030.00517.36
7.1.60.0150.01119.21
7.1.50.0130.00917.11
7.1.00.0030.05722.32
7.0.200.0100.00715.14
7.0.140.0000.07722.12
7.0.60.0070.04019.86
7.0.50.0030.05017.90
7.0.40.0100.08720.29
7.0.30.0270.06020.23
7.0.20.0230.08020.18
7.0.10.0030.09020.27
7.0.00.0170.04720.16
5.6.280.0100.06721.00
5.6.210.0070.04320.55
5.6.200.0130.07318.29
5.6.190.0030.09020.36
5.6.180.0330.07020.47
5.6.170.0230.05320.44
5.6.160.0070.04020.54
5.6.150.0000.07318.29
5.6.140.0030.04018.25
5.6.130.0000.07718.15
5.6.120.0000.05020.99
5.6.110.0070.04721.15
5.6.100.0130.07021.00
5.6.90.0270.06021.01
5.6.80.0070.03720.38
5.6.70.3070.04020.39
5.5.350.0200.04020.33
5.5.340.0030.05717.98
5.5.330.0030.05720.35
5.5.320.0270.04720.27
5.5.310.0300.07320.27
5.5.300.0000.08017.98
5.5.290.0000.04717.94
5.5.280.0070.04320.97
5.5.270.0200.06720.88
5.5.260.0000.09020.77
5.5.250.0170.07020.78
5.5.240.0230.04720.09
5.4.450.0670.05319.30
5.4.440.0700.06019.57
5.4.430.0070.05719.51
5.4.420.0230.05319.46
5.4.410.0100.05318.70
5.4.400.0170.05018.51
5.4.390.0000.06018.73
5.4.380.0070.05718.57
5.4.370.0100.05718.70
5.4.360.0130.05318.75
5.4.350.0070.03912.03
5.4.340.0060.03612.02
5.4.320.0080.04312.51
5.4.310.0060.04412.50
5.4.300.0070.04412.51
5.4.290.0080.04512.51
5.4.280.0110.03712.40
5.4.270.0090.03912.40
5.4.260.0030.03912.40
5.4.250.0070.05318.50
5.4.240.0030.05718.57
5.4.230.0070.05718.88
5.4.220.0100.05318.72
5.4.210.0130.04718.64
5.4.200.0170.04318.83
5.4.190.0100.04718.76
5.4.180.0030.05318.84
5.4.170.0070.05318.72
5.4.160.0130.04718.81
5.4.150.0130.06318.56
5.4.140.0170.04716.43
5.4.130.0070.05316.39
5.4.120.0070.05316.56
5.4.110.0070.05316.25
5.4.100.0100.05016.29
5.4.90.0030.05316.39
5.4.80.0170.04716.27
5.4.70.0070.06016.34
5.4.60.0130.05016.39
5.4.50.0030.05016.34
5.4.40.0100.05016.36
5.4.30.0170.05016.17
5.4.20.0030.05716.52
5.4.10.0130.05016.40
5.4.00.0070.07015.88
5.3.290.0120.03912.80
5.3.280.0100.05014.68
5.3.270.0130.04714.60
5.3.260.0100.06014.68
5.3.250.0200.04014.77
5.3.240.0070.05014.70
5.3.230.0130.04714.69
5.3.220.0100.07314.66
5.3.210.0130.04714.54
5.3.200.0100.04714.73
5.3.190.0170.04014.57
5.3.180.0100.05014.57
5.3.170.0200.04014.78
5.3.160.0030.05714.65
5.3.150.0130.06014.54
5.3.140.0070.05014.64
5.3.130.0100.05714.52
5.3.120.0170.06314.62
5.3.110.0130.04714.64
5.3.100.0100.05714.20
5.3.90.0030.05313.92
5.3.80.0130.04314.10
5.3.70.0100.04714.00
5.3.60.0070.05014.07
5.3.50.0100.05013.95
5.3.40.0100.05014.11
5.3.30.0100.05013.91
5.3.20.0030.05313.89
5.3.10.0030.05713.73
5.3.00.0130.06313.71
5.2.170.0030.04711.29
5.2.160.0100.05011.29
5.2.150.0030.05310.90
5.2.140.0130.03311.15
5.2.130.0100.03311.11
5.2.120.0170.03011.01
5.2.110.0000.04310.93
5.2.100.0200.02711.11
5.2.90.0070.04311.25
5.2.80.0070.04011.18
5.2.70.0000.06711.08
5.2.60.0070.04711.05
5.2.50.0070.04311.02
5.2.40.0030.04310.91
5.2.30.0100.04011.12
5.2.20.0100.05010.84
5.2.10.0000.04710.77
5.2.00.0070.04010.90
5.1.60.0070.03310.18
5.1.50.0070.0339.77
5.1.40.0100.02710.02
5.1.30.0100.03010.23
5.1.20.0030.03710.41
5.1.10.0070.03310.10
5.1.00.0030.03310.25
5.0.50.0030.0308.60
5.0.40.0030.0278.64
5.0.30.0030.0538.15
5.0.20.0030.0278.28
5.0.10.0130.0208.25
5.0.00.0000.0478.22
4.4.90.0000.0237.64
4.4.80.0100.0237.64
4.4.70.0030.0207.64
4.4.60.0000.0237.64
4.4.50.0070.0177.64
4.4.40.0000.0507.64
4.4.30.0000.0237.64
4.4.20.0070.0177.64
4.4.10.0070.0177.64
4.4.00.0070.0337.64
4.3.110.0000.0237.64
4.3.100.0100.0137.64
4.3.90.0030.0237.64
4.3.80.0070.0307.64
4.3.70.0000.0207.64
4.3.60.0000.0237.64
4.3.50.0000.0237.64
4.3.40.0070.0407.64
4.3.30.0030.0207.64
4.3.20.0000.0307.64
4.3.10.0030.0207.64
4.3.00.0000.0236.60

preferences:
55 ms | 401 KiB | 5 Q