3v4l.org

run code in 300+ PHP versions simultaneously
<?php $passes = ["fo\"obar", "foobar\"", "foobar\\\\\"", "foo\\\"\"bar"]; $expect = '{"foo":{"password":"****"}}'; foreach ($passes as $pass) { $json = json_encode(["foo"=>["password"=>$pass]]); if ($expect !== preg_replace('{("password"\s*:\s*)"(?:[^"\\\\]|(?:\\\\.))*"}', '$1"****"', $json)) { echo "Password $pass 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.0150.00718.68
8.3.50.0090.01216.45
8.3.40.0060.01518.96
8.3.30.0090.00618.75
8.3.20.0040.00420.35
8.3.10.0080.00023.48
8.3.00.0040.00420.97
8.2.180.0090.00618.67
8.2.170.0070.00722.96
8.2.160.0070.00722.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00722.22
8.2.120.0050.00226.35
8.2.110.0040.00420.53
8.2.100.0080.00417.91
8.2.90.0040.00419.17
8.2.80.0080.00018.04
8.2.70.0030.00617.75
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0030.00620.64
8.2.30.0000.00821.01
8.2.20.0040.00418.16
8.2.10.0000.00718.06
8.2.00.0040.00418.14
8.1.280.0070.01025.92
8.1.270.0040.00422.14
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0000.01021.99
8.1.230.0000.01418.94
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0030.00917.38
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0040.00418.69
8.1.160.0040.00419.04
8.1.150.0000.00920.71
8.1.140.0030.00519.53
8.1.130.0000.00818.94
8.1.120.0060.00317.67
8.1.110.0060.00317.63
8.1.100.0040.00417.59
8.1.90.0040.00417.65
8.1.80.0070.00017.66
8.1.70.0080.00017.63
8.1.60.0050.00217.77
8.1.50.0040.00417.70
8.1.40.0000.00817.61
8.1.30.0030.00617.67
8.1.20.0040.00417.82
8.1.10.0000.00817.72
8.1.00.0020.00517.68
8.0.300.0000.00819.96
8.0.290.0000.01016.88
8.0.280.0030.00318.48
8.0.270.0030.00317.36
8.0.260.0030.00316.91
8.0.250.0050.00317.15
8.0.240.0000.00716.89
8.0.230.0100.00017.15
8.0.220.0050.00216.93
8.0.210.0040.00417.01
8.0.200.0030.00317.12
8.0.190.0060.00317.09
8.0.180.0060.00316.95
8.0.170.0020.00517.03
8.0.160.0000.00817.04
8.0.150.0030.00316.90
8.0.140.0000.00717.01
8.0.130.0030.00513.44
8.0.120.0050.00217.01
8.0.110.0040.00417.05
8.0.100.0040.00417.09
8.0.90.0000.00717.07
8.0.80.0080.00817.01
8.0.70.0000.00716.86
8.0.60.0050.00317.05
8.0.50.0000.00716.93
8.0.30.0090.01017.16
8.0.20.0100.01017.40
8.0.10.0040.00417.17
8.0.00.0120.00616.75
7.4.330.0000.00515.55
7.4.320.0000.00616.71
7.4.300.0070.00016.75
7.4.290.0100.00016.73
7.4.280.0000.00816.82
7.4.270.0000.00916.72
7.4.260.0060.00316.67
7.4.250.0070.00016.61
7.4.240.0070.00016.72
7.4.230.0030.00316.67
7.4.220.0220.00316.76
7.4.210.0090.00916.81
7.4.200.0020.00516.94
7.4.160.0100.00616.73
7.4.150.0070.01017.40
7.4.140.0090.01117.86
7.4.130.0110.00616.66
7.4.120.0050.01316.57
7.4.110.0170.00016.64
7.4.100.0160.00616.65
7.4.90.0100.00716.71
7.4.80.0120.00619.39
7.4.70.0100.00716.67
7.4.60.0150.00316.52
7.4.50.0090.00916.50
7.4.40.0100.00616.82
7.4.30.0100.00716.93
7.4.00.0130.00614.93
7.3.330.0000.00513.23
7.3.320.0000.00613.39
7.3.310.0030.00316.63
7.3.300.0000.00716.33
7.3.290.0120.00616.46
7.3.280.0070.01016.47
7.3.270.0100.00717.40
7.3.260.0130.00416.59
7.3.250.0120.00516.63
7.3.240.0100.01116.53
7.3.230.0130.01216.53
7.3.210.0160.00016.72
7.3.200.0090.00616.46
7.3.190.0060.00916.72
7.3.180.0100.00616.73
7.3.170.0120.00316.70
7.3.160.0120.00916.55
7.2.330.0030.01316.81
7.2.320.0070.01516.83
7.2.310.0140.00416.96
7.2.300.0040.01216.89
7.2.290.0030.01316.57
7.2.60.0040.01117.23
7.2.50.0110.00717.23
7.1.200.0070.00715.68
7.1.70.0050.00317.38
7.1.60.0230.01033.44
7.1.50.0600.02332.95
7.1.40.0200.02032.80
7.1.30.0870.02032.71
7.1.20.0630.02333.15
7.1.10.0770.00314.88
7.1.00.0370.01314.82
7.0.200.0630.00715.23
7.0.190.0100.01014.93
7.0.180.1330.02014.62
7.0.170.0770.00714.91
7.0.160.0600.01014.76
7.0.150.0630.01314.58
7.0.140.0100.01715.03
7.0.130.0570.01314.85
7.0.120.0370.01314.84
7.0.110.0370.01014.65
7.0.100.0070.00714.86
7.0.90.0370.00714.86
7.0.80.0470.01314.73
7.0.70.0570.01014.69
7.0.60.0470.00714.43
7.0.50.0400.00714.80
7.0.40.0370.01014.92
7.0.30.0430.00714.76
7.0.20.0600.01314.82
7.0.10.0570.01314.94
7.0.00.0570.01314.64

preferences:
33.76 ms | 400 KiB | 5 Q