3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = ['test'=>'some "test" stuff']; echo $json = json_encode($_POST).PHP_EOL; //sent to DB after bindprepare escapes it echo addslashes($json).PHP_EOL; //stored in DB as slashes above are not stored echo $json.PHP_EOL; //efter retrieving from DB and decode print_r(json_decode($json, true)).PHP_EOL;

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.4.120.0170.00419.53
8.4.110.0100.00822.52
8.4.100.0110.00917.82
8.4.90.0110.00920.46
8.4.80.0120.00718.96
8.4.70.0060.00320.60
8.4.60.0110.01020.89
8.4.50.0060.00218.35
8.4.40.0080.00817.95
8.4.30.0100.01018.48
8.4.20.0100.01017.98
8.4.10.0130.00719.32
8.3.250.0090.01016.55
8.3.240.0060.00416.52
8.3.230.0040.00316.67
8.3.220.0070.00419.26
8.3.210.0050.00218.39
8.3.200.0050.00416.61
8.3.190.0110.00917.16
8.3.180.0120.00618.86
8.3.170.0070.00717.35
8.3.160.0030.01416.51
8.3.150.0110.00416.63
8.3.140.0090.00618.25
8.3.130.0040.01118.72
8.3.120.0000.00821.00
8.3.110.0030.00520.94
8.3.100.0040.00418.62
8.3.90.0060.00316.60
8.3.80.0030.00617.97
8.3.70.0100.00616.23
8.3.60.0150.00318.18
8.3.50.0070.01024.57
8.3.40.0140.00718.71
8.3.30.0110.00418.63
8.3.20.0070.00021.76
8.3.10.0000.00821.96
8.3.00.0040.00421.60
8.2.290.0110.00916.61
8.2.280.0110.00918.55
8.2.270.0040.01518.38
8.2.260.0060.01216.99
8.2.250.0040.00416.51
8.2.240.0080.00017.38
8.2.230.0060.00322.58
8.2.220.0060.00324.06
8.2.210.0110.00726.77
8.2.200.0030.00618.54
8.2.190.0070.00716.58
8.2.180.0080.00818.41
8.2.170.0040.01122.96
8.2.160.0130.00322.20
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00426.16
8.2.110.0080.00022.24
8.2.100.0110.00017.84
8.2.90.0040.00417.63
8.2.80.0000.00818.61
8.2.70.0040.00417.80
8.2.60.0000.00818.22
8.2.50.0070.00019.49
8.2.40.0040.00419.34
8.2.30.0030.00519.18
8.2.20.0040.00418.07
8.2.10.0040.00419.42
8.2.00.0000.00719.18
8.1.330.0120.00716.14
8.1.320.0120.00717.77
8.1.310.0070.01016.63
8.1.300.0040.00415.98
8.1.290.0070.00418.88
8.1.280.0150.00325.92
8.1.270.0060.00322.12
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0160.00023.91
8.1.230.0070.00417.89
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0040.00417.36
8.1.190.0030.00617.23
8.1.180.0050.00219.04
8.1.170.0000.00918.60
8.1.160.0040.00419.05
8.1.150.0040.00418.80
8.1.140.0040.00418.89
8.1.130.0070.00020.13
8.1.120.0000.00717.39
8.1.110.0000.01017.44
8.1.100.0070.00017.52
8.1.90.0000.00817.46
8.1.80.0040.00417.39
8.1.70.0070.00017.44
8.1.60.0000.00817.65
8.1.50.0040.00417.47
8.1.40.0040.00417.50
8.1.30.0040.00417.61
8.1.20.0090.00017.65
8.1.10.0040.00417.55
8.1.00.0070.00017.33
8.0.300.0040.00418.92
8.0.290.0030.00616.63
8.0.280.0040.00418.36
8.0.270.0000.00816.81
8.0.260.0040.00418.40
8.0.250.0000.00717.01
8.0.240.0030.00316.88
8.0.230.0000.00716.93
8.0.220.0030.00316.91
8.0.210.0000.00716.93
8.0.200.0070.00016.83
8.0.190.0000.00816.99
8.0.180.0080.00016.89
8.0.170.0040.00416.95
8.0.160.0040.00416.91
8.0.150.0050.00216.72
8.0.140.0070.00016.87
8.0.130.0100.00013.33
8.0.120.0000.00716.89
8.0.110.0000.00816.86
8.0.100.0000.00716.74
8.0.90.0040.00416.70
8.0.80.0050.00916.88
8.0.70.0000.00716.86
8.0.60.0000.00716.71
8.0.50.0070.00016.91
8.0.30.0170.00016.88
8.0.20.0130.00617.21
8.0.10.0040.00417.04
8.0.00.0170.00016.61
7.4.330.0030.00315.55
7.4.320.0000.00616.49
7.4.300.0000.00716.47
7.4.290.0070.00016.46
7.4.280.0040.00416.45
7.4.270.0050.00216.48
7.4.260.0000.00513.28
7.4.250.0000.00716.48
7.4.240.0030.00316.58
7.4.230.0050.00216.69
7.4.220.0000.00716.42
7.4.210.0090.00716.51
7.4.200.0000.00716.63
7.4.130.0120.00616.61
7.4.120.0100.00716.64
7.4.110.0050.01516.35
7.4.100.0140.01016.28
7.4.90.0130.00316.49
7.4.80.0060.01019.39
7.4.70.0030.01316.45
7.4.60.0080.00816.54
7.4.50.0160.00315.94
7.4.40.0160.00316.25
7.4.30.0070.01016.21
7.4.20.0110.00716.45
7.4.10.0110.01016.07
7.4.00.0140.00316.41
7.3.330.0030.00616.32
7.3.320.0000.00613.16
7.3.310.0030.00316.09
7.3.300.0050.00316.29
7.3.290.0100.00516.25
7.3.260.0110.00616.42
7.3.240.0050.01416.48
7.3.230.0150.00416.46
7.3.210.0070.01016.42
7.3.200.0100.00716.37
7.3.190.0030.01216.22
7.3.180.0190.00016.37
7.3.170.0090.01216.11
7.3.160.0100.01316.39
7.3.150.0100.00716.24
7.3.140.0060.01316.02
7.3.130.0060.01216.32
7.3.120.0120.00916.26
7.3.110.0090.00916.03
7.3.100.0100.00716.12
7.3.90.0090.01016.11
7.3.80.0110.01116.10
7.3.70.0090.00916.21
7.3.60.0080.00816.20
7.3.50.0120.00916.16
7.3.40.0100.01016.27
7.3.30.0070.01016.27
7.3.20.0060.01316.22
7.3.10.0350.00916.30
7.3.00.0170.00316.23
7.2.330.0030.01316.78
7.2.320.0030.01816.52
7.2.310.0130.00316.63
7.2.300.0100.01316.73
7.2.290.0170.00716.39
7.2.280.0150.00316.30
7.2.270.0120.00916.27
7.2.260.0060.01516.57
7.2.250.0130.00916.33
7.2.240.0090.01316.09
7.2.230.0170.00716.14
7.2.220.0090.00916.57
7.2.210.0100.01016.43
7.2.200.0060.01216.37
7.2.190.0090.00916.46
7.2.180.0070.01416.41
7.2.170.0070.01116.47
7.2.160.0030.01316.65
7.2.150.0080.01116.53
7.2.140.0090.00916.71
7.2.130.0130.00716.71
7.2.120.0080.01216.57
7.2.110.0120.01116.57
7.2.100.0130.00716.59
7.2.90.0090.00916.65
7.2.80.0120.00916.50
7.2.70.0090.00916.72
7.2.60.0090.01216.49
7.2.50.0110.01016.55
7.2.40.0110.00616.68
7.2.30.0090.01216.47
7.2.20.0170.00316.55
7.2.10.0150.00616.65
7.2.00.0090.01216.24

preferences:
30.89 ms | 403 KiB | 5 Q