3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"foo": "lorem `bar` ipsum"}'; echo 'Without str_replace()' . PHP_EOL; var_dump(json_decode($json, true)); echo PHP_EOL; echo 'With your current str_replace()' . PHP_EOL; var_dump(json_decode(str_replace('`', '"', $json), true)); echo PHP_EOL; echo 'With esceped str_replace()' . PHP_EOL; var_dump(json_decode(str_replace('`', '\"', $json), true));

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.5.10.0060.01218.64
8.5.00.0120.01120.00
8.4.160.0120.01023.73
8.4.150.0020.00014.05
8.4.140.0110.00917.68
8.4.130.0110.01017.51
8.4.120.0040.00520.37
8.4.110.0110.00618.58
8.4.100.0130.00617.71
8.4.90.0130.00917.51
8.4.80.0080.00017.75
8.4.70.0130.00919.70
8.4.60.0130.00817.45
8.4.50.0100.00920.42
8.4.40.0180.00417.65
8.4.30.0130.00718.40
8.4.20.0130.00617.98
8.4.10.0060.00317.51
8.3.280.0100.01018.37
8.3.270.0140.00516.55
8.3.260.0140.00516.66
8.3.250.0030.00718.81
8.3.240.0120.00716.51
8.3.230.0140.00516.57
8.3.220.0060.00217.02
8.3.210.0140.00616.74
8.3.200.0120.00716.25
8.3.190.0060.00217.00
8.3.180.0080.01016.43
8.3.170.0060.00316.63
8.3.160.0120.00618.37
8.3.150.0110.00716.68
8.3.140.0050.00316.53
8.3.130.0100.00718.37
8.3.120.0090.00018.91
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0100.00026.77
8.3.80.0060.00316.40
8.3.70.0110.00716.58
8.3.60.0040.01118.43
8.3.50.0140.00318.02
8.3.40.0120.00320.64
8.3.30.0160.00018.54
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0090.00921.80
8.2.280.0030.00418.48
8.2.270.0070.00716.59
8.2.260.0040.00417.17
8.2.250.0070.00416.85
8.2.240.0100.00018.96
8.2.230.0130.00322.58
8.2.220.0040.00437.54
8.2.210.0040.00726.77
8.2.200.0030.00616.75
8.2.190.0130.00716.58
8.2.180.0090.00625.92
8.2.170.0040.01122.96
8.2.160.0060.00922.96
8.2.150.0000.00725.66
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.89
8.2.110.0070.00419.27
8.2.100.0030.01019.66
8.2.90.0080.00019.16
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0080.00017.93
8.2.50.0050.00518.07
8.2.40.0080.00018.16
8.2.30.0000.00718.08
8.2.20.0040.00420.31
8.2.10.0040.00417.53
8.2.00.0040.00419.16
8.1.330.0110.00816.54
8.1.320.0050.00316.13
8.1.310.0110.00716.61
8.1.300.0070.01116.04
8.1.290.0000.01018.88
8.1.280.0040.01125.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00621.15
8.1.230.0120.00022.01
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.10
8.1.180.0030.00618.10
8.1.170.0000.00818.50
8.1.160.0000.00718.88
8.1.150.0030.00518.59
8.1.140.0060.00317.29
8.1.130.0070.00017.43
8.1.120.0030.00417.41
8.1.110.0040.00417.32
8.1.100.0040.00417.32
8.1.90.0000.00817.33
8.1.80.0030.00517.30
8.1.70.0000.00717.46
8.1.60.0040.00417.56
8.1.50.0120.00017.48
8.1.40.0050.00317.54
8.1.30.0040.00417.59
8.1.20.0040.00417.60
8.1.10.0040.00417.51
8.1.00.0040.00417.45
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00920.27
8.0.270.0030.00317.95
8.0.260.0030.00316.80
8.0.250.0000.00716.93
8.0.240.0030.00316.85
8.0.230.0070.00016.91
8.0.220.0000.00816.86
8.0.210.0000.00816.82
8.0.200.0060.00016.90
8.0.190.0000.00716.80
8.0.180.0050.00316.93
8.0.170.0060.00316.86
8.0.160.0040.00416.83
8.0.150.0000.00716.75
8.0.140.0030.00516.82
8.0.130.0000.00716.66
8.0.120.0070.00016.85
8.0.110.0040.00416.64
8.0.100.0000.00716.65
8.0.90.0000.00716.71
8.0.80.0070.00016.64
8.0.70.0000.00816.83
8.0.60.0080.00016.75
8.0.50.0040.00416.64
8.0.30.0060.00316.83
8.0.20.0040.00416.79
8.0.10.0050.00316.84
7.4.330.0000.00515.55
7.4.320.0070.00016.44
7.4.300.0030.00316.56
7.4.290.0030.00516.46
7.4.280.0040.00416.53
7.4.270.0000.00716.54
7.4.260.0070.00016.45
7.4.250.0040.00416.42
7.4.240.0040.00416.59
7.4.230.0070.00016.45
7.4.220.0000.00716.57
7.4.210.0000.00716.56
7.4.200.0030.00316.35
7.4.190.0030.00316.59
7.4.180.0000.00716.52
7.4.160.0050.00216.58
7.4.150.0040.00416.46
7.4.140.0030.00316.40
7.4.130.0000.00816.33
7.4.120.0060.00316.36
7.4.110.0070.00016.42
7.4.100.0040.00416.44
7.4.90.0070.00016.37
7.4.80.0040.00416.30
7.4.70.0000.00716.41
7.4.60.0030.00316.30
7.4.50.0000.00716.27
7.4.40.0000.00716.36
7.4.30.0030.00316.46
7.4.20.0030.00316.44
7.4.10.0070.00016.38
7.4.00.0040.00416.45
5.6.350.0030.00715.58

preferences:
39.61 ms | 403 KiB | 5 Q