3v4l.org

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

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.0110.00818.43
8.3.50.0170.00716.87
8.3.40.0100.01018.96
8.3.30.0110.00418.76
8.3.20.0050.00220.34
8.3.10.0050.00323.48
8.3.00.0070.00020.85
8.2.180.0070.00718.43
8.2.170.0110.00422.96
8.2.160.0030.01022.23
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0080.00822.29
8.2.120.0000.00826.35
8.2.110.0030.00619.21
8.2.100.0080.00317.97
8.2.90.0060.00318.15
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0040.00420.54
8.2.30.0080.00021.18
8.2.20.0080.00018.07
8.2.10.0040.00418.16
8.2.00.0040.00418.22
8.1.280.0030.01425.92
8.1.270.0080.00022.20
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0040.00723.72
8.1.230.0080.00322.66
8.1.220.0000.00817.74
8.1.210.0040.00418.87
8.1.200.0060.00717.11
8.1.190.0030.00717.38
8.1.180.0000.00818.10
8.1.170.0090.00018.69
8.1.160.0050.00319.15
8.1.150.0040.00418.97
8.1.140.0040.00419.62
8.1.130.0030.00318.95
8.1.120.0030.00717.56
8.1.110.0000.00917.64
8.1.100.0070.00017.52
8.1.90.0030.00617.61
8.1.80.0070.00017.67
8.1.70.0070.00017.67
8.1.60.0000.00817.78
8.1.50.0080.00017.59
8.1.40.0040.00417.59
8.1.30.0000.00817.80
8.1.20.0070.00017.73
8.1.10.0040.00417.63
8.1.00.0000.00717.59
8.0.300.0070.00019.90
8.0.290.0000.00816.88
8.0.280.0030.00318.38
8.0.270.0030.00317.25
8.0.260.0070.00016.85
8.0.250.0040.00417.11
8.0.240.0000.00716.93
8.0.230.0060.00317.00
8.0.220.0040.00417.09
8.0.210.0000.00716.91
8.0.200.0030.00317.07
8.0.190.0080.00016.98
8.0.180.0040.00416.96
8.0.170.0040.00417.09
8.0.160.0030.00617.08
8.0.150.0000.00716.98
8.0.140.0040.00417.07
8.0.130.0000.00713.36
8.0.120.0030.00616.89
8.0.110.0000.00717.09
8.0.100.0000.00716.98
8.0.90.0030.00517.08
8.0.80.0060.00917.02
8.0.70.0040.00417.06
8.0.60.0040.00416.95
8.0.50.0000.00817.08
8.0.30.0070.01217.26
8.0.20.0120.00717.47
8.0.10.0080.00017.23
8.0.00.0090.01516.86
7.4.330.0000.00515.55
7.4.320.0030.00316.78
7.4.300.0030.00316.72
7.4.290.0070.00416.58
7.4.280.0080.00016.77
7.4.270.0040.00416.85
7.4.260.0090.00016.79
7.4.250.0070.00016.77
7.4.240.0000.00716.79
7.4.230.0030.00316.84
7.4.220.0060.01516.93
7.4.210.0070.00716.80
7.4.200.0070.00016.61
7.4.160.0060.01316.73
7.4.150.0130.00517.40
7.4.140.0100.00917.86
7.4.130.0070.01116.79
7.4.120.0090.00916.65
7.4.110.0090.01016.62
7.4.100.0150.00716.61
7.4.90.0130.00616.66
7.4.80.0050.01819.39
7.4.70.0130.00316.66
7.4.60.0030.01316.91
7.4.50.0040.01116.71
7.4.40.0130.00316.78
7.4.30.0160.00016.64
7.4.00.0040.01415.34
7.3.330.0030.00313.36
7.3.320.0000.00513.23
7.3.310.0040.00416.45
7.3.300.0020.00516.46
7.3.290.0110.00716.52
7.3.280.0100.00616.46
7.3.270.0090.00917.40
7.3.260.0150.00216.67
7.3.250.0110.00716.75
7.3.240.0050.01216.70
7.3.230.0100.01016.57
7.3.210.0110.01116.48
7.3.200.0030.01316.50
7.3.190.0060.00916.43
7.3.180.0080.00816.48
7.3.170.0090.00616.79
7.3.160.0100.00716.65
7.3.10.0100.00716.50
7.3.00.0070.00716.48
7.2.330.0060.01116.82
7.2.320.0100.01416.82
7.2.310.0030.01416.76
7.2.300.0110.01216.82
7.2.290.0160.00816.68
7.2.130.0160.00017.04
7.2.120.0140.01416.67
7.2.110.0140.00816.47
7.2.100.0180.00616.64
7.2.90.0220.01316.50
7.2.80.0170.00716.87
7.2.70.0210.01316.80
7.2.60.0130.00516.82
7.2.50.0110.01116.22
7.2.40.0110.01116.77
7.2.30.0170.01016.64
7.2.20.0140.00716.76
7.2.10.0090.01816.29
7.2.00.0090.00918.32
7.1.250.0200.00415.57
7.1.200.0080.00415.66
7.1.100.0090.00318.36
7.1.70.0110.01117.39
7.1.60.0670.00333.44
7.1.50.0530.01033.18
7.1.40.0600.01032.82
7.1.30.0900.01333.08
7.1.20.0630.00332.98
7.1.10.0400.01715.00
7.1.00.0400.01014.95
7.0.200.0370.01015.12
7.0.190.0370.01015.09
7.0.180.0400.00714.74
7.0.170.0430.00714.61
7.0.160.0400.01014.82
7.0.150.0430.01014.61
7.0.140.0400.01014.66
7.0.130.0530.00314.89
7.0.120.0470.01014.85
7.0.110.0470.00314.68
7.0.100.0400.01014.64
7.0.90.0400.01314.89
7.0.80.0400.01014.64
7.0.70.0370.01314.56
7.0.60.0500.00314.32
7.0.50.0530.01014.67
7.0.40.0470.00714.75
7.0.30.0430.01314.91
7.0.20.0400.01315.03
7.0.10.0570.01014.86
7.0.00.0400.01314.89

preferences:
40.71 ms | 401 KiB | 5 Q