3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ps = ["fo\"obar", "foobar\"", "foobar\\\\\"", "foo\\\"\"bar"]; foreach ($ps as $p) { $c = json_encode(["foo"=>["password"=>$p]]); echo preg_replace('{("password"\s*:\s*)"(?:[^"\\\\]|(?:\\\\.))*"}', '$1"****"', $c), "\n"; }

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.00918.41
8.3.50.0070.01416.66
8.3.40.0030.01218.97
8.3.30.0110.00718.60
8.3.20.0040.00420.16
8.3.10.0080.00021.85
8.3.00.0040.00420.95
8.2.180.0110.00418.41
8.2.170.0070.01422.96
8.2.160.0090.00622.29
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00322.34
8.2.120.0040.00426.35
8.2.110.0100.00020.52
8.2.100.0060.00618.03
8.2.90.0060.00319.22
8.2.80.0040.00418.03
8.2.70.0030.00517.63
8.2.60.0000.00817.93
8.2.50.0030.00518.10
8.2.40.0030.00622.18
8.2.30.0000.00719.26
8.2.20.0070.00218.16
8.2.10.0080.00018.11
8.2.00.0070.00018.08
8.1.280.0180.00325.92
8.1.270.0080.00022.13
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0150.00720.82
8.1.230.0040.00719.07
8.1.220.0050.00317.91
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0080.00018.62
8.1.160.0000.00719.01
8.1.150.0040.00420.81
8.1.140.0040.00419.48
8.1.130.0040.00418.98
8.1.120.0030.00817.59
8.1.110.0040.00417.62
8.1.100.0080.00017.61
8.1.90.0040.00417.62
8.1.80.0030.00317.61
8.1.70.0000.00717.67
8.1.60.0060.00317.77
8.1.50.0050.00317.68
8.1.40.0000.00817.60
8.1.30.0030.00617.76
8.1.20.0080.00017.74
8.1.10.0050.00217.76
8.1.00.0000.00817.60
8.0.300.0050.00218.77
8.0.290.0050.00216.75
8.0.280.0030.00318.48
8.0.270.0030.00317.23
8.0.260.0030.00516.89
8.0.250.0000.00617.08
8.0.240.0030.00316.88
8.0.230.0070.00317.13
8.0.220.0040.00416.93
8.0.210.0080.00017.04
8.0.200.0000.00717.13
8.0.190.0050.00517.06
8.0.180.0080.00017.08
8.0.170.0030.00317.07
8.0.160.0100.00017.07
8.0.150.0040.00417.05
8.0.140.0000.00717.02
8.0.130.0050.00213.44
8.0.120.0000.00816.92
8.0.110.0040.00416.93
8.0.100.0030.00516.91
8.0.90.0040.00416.90
8.0.80.0120.01217.11
8.0.70.0000.00717.02
8.0.60.0040.00417.11
8.0.50.0040.00417.00
8.0.30.0110.00617.00
8.0.20.0070.01317.40
8.0.10.0050.00317.06
8.0.00.0140.00316.74
7.4.330.0000.00515.55
7.4.320.0000.00616.71
7.4.300.0000.00616.79
7.4.290.0030.00716.73
7.4.280.0050.00316.72
7.4.270.0070.00016.74
7.4.260.0000.00816.80
7.4.250.0030.00316.64
7.4.240.0080.00016.79
7.4.230.0000.00616.92
7.4.220.0130.01016.87
7.4.210.0060.00916.65
7.4.200.0000.00716.89
7.4.160.0130.00416.67
7.4.150.0110.00817.40
7.4.140.0090.01017.86
7.4.130.0070.01116.87
7.4.120.0130.00516.76
7.4.110.0040.01416.46
7.4.100.0150.00416.54
7.4.90.0090.01216.67
7.4.80.0120.01219.39
7.4.70.0100.00716.72
7.4.60.0130.00316.76
7.4.50.0080.00816.45
7.4.40.0100.00716.89
7.4.30.0120.00416.61
7.4.00.0060.01015.16
7.3.330.0030.00313.31
7.3.320.0050.00013.18
7.3.310.0070.00016.53
7.3.300.0030.00316.53
7.3.290.0030.01216.55
7.3.280.0090.00816.47
7.3.270.0060.01117.40
7.3.260.0080.00816.65
7.3.250.0140.00716.65
7.3.240.0060.01016.77
7.3.230.0000.01816.57
7.3.210.0070.01016.55
7.3.200.0130.01016.49
7.3.190.0060.00916.56
7.3.180.0060.01016.65
7.3.170.0090.00616.73
7.3.160.0060.00916.61
7.3.10.0060.00916.81
7.3.00.0070.00716.82
7.2.330.0070.01116.85
7.2.320.0110.00716.85
7.2.310.0000.01916.73
7.2.300.0230.02016.78
7.2.290.0060.00916.69
7.2.130.0060.00617.09
7.2.120.0090.00617.31
7.2.110.0040.00717.18
7.2.100.0120.00317.11
7.2.90.0070.00717.05
7.2.80.0030.01117.18
7.2.70.0060.00317.05
7.2.60.0030.00617.12
7.2.50.0030.00716.90
7.2.40.0100.00317.09
7.2.30.0030.00717.06
7.2.20.0040.00716.88
7.2.10.0030.01016.99
7.2.00.0030.01017.09
7.1.250.0070.00715.99
7.1.200.0060.00616.08
7.1.70.0090.00917.42
7.1.60.0080.00817.55
7.1.50.0120.00617.34
7.1.40.0100.01316.68
7.1.30.0120.00416.84
7.1.20.0130.00616.90
7.1.10.0030.00616.97
7.1.00.0000.00716.80
7.0.200.0030.01416.83
7.0.190.0050.00716.93
7.0.180.0050.00816.45
7.0.170.0080.00816.39
7.0.160.0080.00816.42
7.0.150.0050.00316.47
7.0.140.0050.00316.55
7.0.130.0040.00416.85
7.0.120.0000.00816.97
7.0.110.0000.00816.66
7.0.100.0070.00016.68
7.0.90.0030.00516.65
7.0.80.0030.00716.43
7.0.70.0000.01116.59
7.0.60.0000.00716.51
7.0.50.0000.01116.71
7.0.40.0030.01314.87
7.0.30.0000.01314.87
7.0.20.0000.01114.87
7.0.10.0040.00414.87
7.0.00.0080.00014.87

preferences:
38.41 ms | 400 KiB | 5 Q