3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "'string'\n"; $r = json_decode("'string'"); var_dump($r, json_last_error(), json_last_error_msg()); echo "\n"; echo "100\n"; $r = json_decode("100"); // int var_dump($r, json_last_error(), json_last_error_msg()); echo "\n"; echo "1.\n"; $r = json_decode("1."); // float var_dump($r, json_last_error(), json_last_error_msg()); echo "\n"; echo "1.0\n"; $r = json_decode("1.0"); // float var_dump($r, json_last_error(), json_last_error_msg()); echo "\n"; echo ".5\n"; $r = json_decode(".5"); // float var_dump($r, json_last_error(), json_last_error_msg()); echo "\n"; echo "true\n"; $r = json_decode("true"); // bool var_dump($r, json_last_error(), json_last_error_msg());

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.0100.01016.38
8.3.50.0100.01018.19
8.3.40.0120.00918.85
8.3.30.0110.00418.68
8.3.20.0030.00620.20
8.3.10.0080.00023.65
8.3.00.0070.00019.79
8.2.180.0120.00318.29
8.2.170.0040.01122.96
8.2.160.0140.00320.34
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0100.00021.05
8.2.120.0040.00426.35
8.2.110.0030.00719.24
8.2.100.0080.00417.84
8.2.90.0050.00319.22
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0030.00517.80
8.2.50.0090.00218.07
8.2.40.0030.00522.19
8.2.30.0030.00520.50
8.2.20.0020.00517.49
8.2.10.0040.00417.99
8.2.00.0040.00417.88
8.1.270.0060.00920.18
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0000.00822.24
8.1.230.0060.00617.42
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00817.22
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0030.00618.46
8.1.160.0050.00220.70
8.1.150.0080.00018.84
8.1.140.0040.00419.52
8.1.130.0000.00717.63
8.1.120.0040.00417.40
8.1.110.0030.00317.45
8.1.100.0030.00617.30
8.1.90.0080.00017.39
8.1.80.0090.00017.40
8.1.70.0000.00717.34
8.1.60.0000.00817.53
8.1.50.0040.00417.42
8.1.40.0040.00417.49
8.1.30.0030.00617.59
8.1.20.0080.00017.61
8.1.10.0000.00717.51
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.36
8.0.270.0030.00317.27
8.0.260.0040.00417.20
8.0.250.0030.00316.89
8.0.240.0030.00316.95
8.0.230.0030.00616.89
8.0.220.0050.00216.84
8.0.210.0000.00916.86
8.0.200.0030.00316.89
8.0.190.0040.00416.77
8.0.180.0000.00716.93
8.0.170.0030.00516.90
8.0.160.0040.00416.80
8.0.150.0040.00416.79
8.0.140.0040.00416.75
8.0.130.0030.00313.26
8.0.120.0030.00516.66
8.0.110.0020.00516.77
8.0.100.0040.00416.78
8.0.90.0000.00816.65
8.0.80.0090.00616.84
8.0.70.0050.00316.88
8.0.60.0040.00416.83
8.0.50.0080.00016.66
8.0.30.0090.00916.88
8.0.20.0140.00517.40
8.0.10.0070.00016.85
8.0.00.0130.00916.73
7.4.330.0050.00016.83
7.4.320.0000.00716.40
7.4.300.0040.00416.57
7.4.290.0030.00316.38
7.4.280.0060.00316.57
7.4.270.0030.00316.59
7.4.260.0000.00716.45
7.4.250.0030.00316.27
7.4.240.0000.00716.45
7.4.230.0030.00316.45
7.4.220.0110.01116.55
7.4.210.0070.00716.58
7.4.200.0030.00316.19
7.4.160.0120.00316.34
7.4.150.0180.00617.40
7.4.140.0120.00817.86
7.4.130.0080.01016.49
7.4.120.0040.01216.40
7.4.110.0030.01716.41
7.4.100.0110.00716.43
7.4.90.0120.00916.40
7.4.80.0090.00919.39
7.4.70.0140.00316.41
7.4.60.0080.00816.39
7.4.50.0060.01316.40
7.4.40.0140.00416.34
7.4.30.0100.01016.50
7.4.10.0060.01014.75
7.4.00.0120.00514.88
7.3.330.0000.00513.09
7.3.320.0030.00312.91
7.3.310.0080.00016.11
7.3.300.0040.00416.07
7.3.290.0070.00916.13
7.3.280.0060.01116.09
7.3.270.0050.01417.40
7.3.260.0110.00616.23
7.3.250.0140.00516.29
7.3.240.0090.01216.13
7.3.230.0070.01116.39
7.3.210.0090.01516.44
7.3.200.0110.00316.25
7.3.190.0130.00716.42
7.3.180.0030.01416.48
7.3.170.0070.01516.38
7.3.160.0090.00616.34
7.3.130.0060.01214.45
7.3.120.0100.00614.48
7.3.110.0000.01914.38
7.3.100.0040.01114.22
7.3.90.0180.00014.92
7.3.80.0070.00714.26
7.3.70.0080.00414.67
7.3.60.0070.00714.63
7.3.50.0120.00614.45
7.3.40.0030.01214.46
7.3.30.0070.00714.52
7.3.20.0030.01416.00
7.3.10.0090.00615.98
7.3.00.0040.01116.33
7.2.330.0060.01116.35
7.2.320.0040.01716.61
7.2.310.0040.01416.59
7.2.300.0130.00616.36
7.2.290.0040.01516.46
7.2.260.0110.00714.66
7.2.250.0070.01014.46
7.2.240.0060.00915.12
7.2.230.0060.00814.87
7.2.220.0080.00815.09
7.2.210.0100.00714.80
7.2.200.0030.00615.00
7.2.190.0000.01514.48
7.2.180.0070.01014.89
7.2.170.0000.01514.52
7.2.160.0120.00314.54
7.2.150.0020.01516.46
7.2.140.0030.01216.48
7.2.130.0070.01016.70
7.2.120.0000.01216.47
7.2.110.0030.01016.86
7.2.100.0000.01316.96
7.2.90.0000.01316.61
7.2.80.0030.00916.82
7.2.70.0040.00716.72
7.2.60.0090.00716.68
7.2.50.0030.01016.59
7.2.40.0000.01316.72
7.2.30.0100.00316.73
7.2.20.0090.00616.62
7.2.10.0070.00416.66
7.2.00.0060.00917.69
7.1.330.0080.00615.62
7.1.320.0070.00315.75
7.1.310.0040.00815.75
7.1.300.0070.00715.47
7.1.290.0060.01215.28
7.1.280.0000.01415.41
7.1.270.0030.00715.49
7.1.260.0060.00815.38
7.1.250.0090.00615.52
7.1.240.0060.00615.49
7.1.230.0000.01415.53
7.1.220.0100.00315.64
7.1.210.0040.00715.27
7.1.200.0010.01215.61
7.1.190.0060.00615.72
7.1.180.0030.00615.49
7.1.170.0040.00415.53
7.1.160.0040.00815.64
7.1.150.0060.00315.61
7.1.140.0080.00315.53
7.1.130.0030.01015.73
7.1.120.0000.01215.52
7.1.110.0110.00415.73
7.1.100.0050.01216.92
7.1.90.0060.01015.76
7.1.80.0100.00615.44
7.1.70.0060.00316.20
7.1.60.0040.01417.28
7.1.50.0070.00916.24
7.1.40.0090.00615.67
7.1.30.0090.00315.37
7.1.20.0100.00315.74
7.1.10.0040.01115.31
7.1.00.0070.03818.93
7.0.330.0030.00915.00
7.0.320.0090.00314.69
7.0.310.0100.00315.32
7.0.300.0000.00814.88
7.0.290.0100.00315.05
7.0.280.0040.00415.16
7.0.270.0040.01115.18
7.0.260.0000.01214.88
7.0.250.0060.00615.10
7.0.240.0110.00415.02
7.0.230.0000.01315.04
7.0.220.0060.00614.88
7.0.210.0040.00815.46
7.0.200.0050.00716.01
7.0.190.0090.00615.11
7.0.180.0040.00715.24
7.0.170.0140.00015.48
7.0.160.0060.00615.18
7.0.150.0000.00815.34
7.0.140.0040.01214.69
7.0.130.0040.01115.18
7.0.120.0030.00715.03
7.0.110.0060.00615.22
7.0.100.0090.00614.81
7.0.90.0060.00615.38
7.0.80.0070.00715.43
7.0.70.0060.00614.84
7.0.60.0100.04817.58
7.0.50.0110.03316.47
7.0.40.0100.04316.73
7.0.30.0180.04416.59
7.0.20.0170.02716.79
7.0.10.0020.02816.81
7.0.00.0080.04016.71
5.6.400.0080.00413.75
5.6.390.0030.00614.29
5.6.380.0000.01414.02
5.6.370.0000.01014.01
5.6.360.0030.01014.28
5.6.350.0060.00313.98
5.6.340.0030.01013.93
5.6.330.0090.00314.01
5.6.320.0090.00014.31
5.6.310.0060.00913.93
5.6.300.0060.00914.42
5.6.290.0070.00714.25
5.6.280.0040.01817.59
5.6.270.0070.00614.16
5.6.260.0070.00714.32
5.6.250.0040.01114.02
5.6.240.0060.00914.08
5.6.230.0060.00814.03
5.6.220.0080.00614.02
5.6.210.0110.04117.43
5.6.200.0070.03516.08
5.6.190.0110.04017.09
5.6.180.1790.02317.02
5.6.170.0150.03117.38
5.6.160.0030.02417.25
5.6.150.0050.02516.03
5.6.140.0040.02416.05
5.6.130.0050.04315.95
5.6.120.0030.04217.35
5.6.110.0090.03617.45
5.6.100.0080.02217.45
5.6.90.0070.02317.46
5.6.80.0080.02217.22
5.6.70.0030.01013.83
5.6.60.0030.01313.67
5.6.50.0040.00713.77
5.6.40.0040.00714.13
5.6.30.0030.00613.97
5.6.20.0030.00513.73
5.6.10.0090.00613.95
5.6.00.0120.00013.84
5.5.380.0070.01014.20
5.5.370.0000.01714.27
5.5.360.0110.00414.16
5.5.350.0050.03217.33
5.5.340.0070.04015.91
5.5.330.0090.04217.12
5.5.320.0330.02017.13
5.5.310.0150.02217.11
5.5.300.0070.04216.20
5.5.290.0020.03916.19
5.5.280.0030.05017.52
5.5.270.0070.04517.45
5.5.260.0120.04717.28
5.5.250.0050.03317.45
5.5.240.0190.03617.19
5.5.230.0000.00914.40
5.5.220.0040.01213.89
5.5.210.0060.00614.20
5.5.200.0120.00014.04
5.5.190.0060.00314.10
5.5.180.0000.01114.00
5.5.170.0060.00914.05
5.5.160.0040.00813.89
5.5.150.0000.01414.03
5.5.140.0030.00614.30
5.5.130.0110.00614.09
5.5.120.0110.00414.20
5.5.110.0070.01013.98
5.5.100.0090.00014.04
5.5.90.0030.01013.84
5.5.80.0120.00313.77
5.5.70.0080.00613.91
5.5.60.0060.00914.14
5.5.50.0110.00613.90
5.5.40.0070.01113.98
5.5.30.0110.00314.15
5.5.20.0060.01014.00
5.5.10.0030.00614.14
5.5.00.0040.01113.71

preferences:
35.49 ms | 400 KiB | 5 Q