3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "'string'\n"; json_decode("'string'"); var_dump(json_last_error(), json_last_error_msg()); echo "100\n"; json_decode("100"); // int var_dump(json_last_error(), json_last_error_msg()); echo "1.\n"; json_decode("1."); // float var_dump(json_last_error(), json_last_error_msg()); echo "1.0\n"; json_decode("1.0"); // float var_dump(json_last_error(), json_last_error_msg()); echo ".5\n"; json_decode(".5"); // float var_dump(json_last_error(), json_last_error_msg()); echo "true\n"; json_decode("true"); // bool var_dump(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.0190.00316.50
8.3.50.0190.01021.91
8.3.40.0000.01418.47
8.3.30.0110.00418.71
8.3.20.0000.00719.96
8.3.10.0080.00023.74
8.3.00.0040.00419.66
8.2.180.0120.00918.29
8.2.170.0080.00622.96
8.2.160.0000.01720.24
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00920.94
8.2.120.0000.00926.35
8.2.110.0060.00320.47
8.2.100.0060.00617.80
8.2.90.0030.00519.14
8.2.80.0050.00317.97
8.2.70.0060.00317.38
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0050.00322.29
8.2.30.0040.00420.58
8.2.20.0050.00217.68
8.2.10.0050.00317.86
8.2.00.0000.00817.95
8.1.280.0040.01125.92
8.1.270.0070.01120.38
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00622.19
8.1.230.0080.00419.44
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0000.00817.10
8.1.180.0030.00618.10
8.1.170.0040.00418.66
8.1.160.0000.00720.69
8.1.150.0000.00718.80
8.1.140.0040.00419.48
8.1.130.0000.00717.59
8.1.120.0000.00717.35
8.1.110.0040.00417.25
8.1.100.0000.00817.30
8.1.90.0050.00217.34
8.1.80.0000.00817.28
8.1.70.0000.00717.34
8.1.60.0030.00617.40
8.1.50.0090.00017.32
8.1.40.0000.00817.38
8.1.30.0030.00617.53
8.1.20.0080.00017.43
8.1.10.0040.00417.46
8.1.00.0030.00617.40
8.0.300.0090.00018.77
8.0.290.0070.00016.62
8.0.280.0040.00418.40
8.0.270.0030.00317.20
8.0.260.0000.00717.21
8.0.250.0070.00016.89
8.0.240.0030.00316.77
8.0.230.0080.00016.74
8.0.220.0000.00716.80
8.0.210.0040.00416.76
8.0.200.0030.00316.83
8.0.190.0000.00816.84
8.0.180.0000.00816.73
8.0.170.0060.00316.80
8.0.160.0070.00016.74
8.0.150.0000.00816.77
8.0.140.0000.00716.70
8.0.130.0050.00013.20
8.0.120.0040.00416.62
8.0.110.0000.00716.68
8.0.100.0040.00416.78
8.0.90.0000.00716.73
8.0.80.0090.01316.68
8.0.70.0000.00716.74
8.0.60.0000.00816.63
8.0.50.0000.00716.84
8.0.30.0140.00716.99
8.0.20.0140.01117.40
8.0.10.0070.00016.82
8.0.00.0100.01016.62
7.4.330.0000.00516.82
7.4.320.0000.00716.40
7.4.300.0060.00016.47
7.4.290.0030.00316.53
7.4.280.0030.00716.33
7.4.270.0070.00016.31
7.4.260.0070.00016.36
7.4.250.0040.00416.44
7.4.240.0020.00516.45
7.4.230.0000.00716.38
7.4.220.0150.00316.33
7.4.210.0110.00316.31
7.4.200.0000.00716.36
7.4.160.0000.01516.46
7.4.150.0170.01117.40
7.4.140.0120.00617.86
7.4.130.0130.00316.42
7.4.120.0060.01016.53
7.4.110.0090.00916.50
7.4.100.0060.01816.26
7.4.90.0130.01016.51
7.4.80.0110.00619.39
7.4.70.0000.01816.43
7.4.60.0060.00916.46
7.4.50.0060.01016.38
7.4.40.0130.00316.25
7.4.30.0070.01316.53
7.4.00.0090.00914.70
7.3.330.0000.00713.08
7.3.320.0080.00013.01
7.3.310.0000.00716.29
7.3.300.0030.00316.14
7.3.290.0080.00816.13
7.3.280.0080.01016.18
7.3.270.0100.00717.40
7.3.260.0100.00616.11
7.3.250.0130.00716.31
7.3.240.0050.01116.07
7.3.230.0100.01316.39
7.3.210.0040.01716.15
7.3.200.0070.01016.44
7.3.190.0090.00916.27
7.3.180.0060.01016.13
7.3.170.0070.01316.44
7.3.160.0050.01116.12
7.3.120.0060.01314.35
7.3.110.0070.01114.58
7.3.100.0120.00614.46
7.3.90.0040.01214.58
7.3.80.0110.00714.58
7.3.70.0090.00314.21
7.3.60.0060.00914.50
7.3.50.0050.00514.39
7.3.40.0090.00614.08
7.3.30.0080.00614.44
7.3.20.0030.00716.10
7.3.10.0030.01216.51
7.3.00.0020.01116.60
7.2.330.0100.00716.28
7.2.320.0060.01216.44
7.2.310.0100.00716.65
7.2.300.0100.00716.46
7.2.290.0090.00916.54
7.2.250.0100.00714.43
7.2.240.0040.01214.86
7.2.230.0030.01314.65
7.2.220.0030.01314.73
7.2.210.0100.01014.61
7.2.200.0080.00414.75
7.2.190.0030.00714.59
7.2.180.0040.00714.89
7.2.170.0060.00914.86
7.2.160.0090.00014.64
7.2.150.0130.00616.34
7.2.140.0070.01316.50
7.2.130.0050.01016.59
7.2.120.0020.01216.81
7.2.110.0030.01016.79
7.2.100.0070.00716.76
7.2.90.0060.00916.69
7.2.80.0050.01216.62
7.2.70.0070.00816.69
7.2.60.0090.00716.74
7.2.50.0060.01116.69
7.2.40.0030.01316.74
7.2.30.0080.00716.59
7.2.20.0010.01116.56
7.2.10.0060.00816.68
7.2.00.0040.01217.10
7.1.330.0100.01015.71
7.1.320.0000.01715.76
7.1.310.0090.00815.50
7.1.300.0040.00415.26
7.1.290.0030.00515.61
7.1.280.0070.00315.57
7.1.270.0040.00715.54
7.1.260.0060.01315.48
7.1.250.0020.00815.34
7.1.240.0030.01215.25
7.1.230.0040.00415.63
7.1.220.0030.01315.64
7.1.210.0070.00715.50
7.1.200.0060.00715.75
7.1.190.0070.01115.55
7.1.180.0120.00315.29
7.1.170.0030.00715.61
7.1.160.0040.01115.54
7.1.150.0070.01015.66
7.1.140.0030.01215.60
7.1.130.0000.01315.53
7.1.120.0030.01415.21
7.1.110.0070.01015.25
7.1.100.0050.01116.63
7.1.90.0040.01215.60
7.1.80.0000.01515.38
7.1.70.0040.00516.30
7.1.60.0060.01417.21
7.1.50.0030.01516.03
7.1.40.0030.01015.72
7.1.30.0030.01015.72
7.1.20.0060.00615.05
7.1.10.0040.00915.36
7.1.00.0040.04018.96
7.0.330.0040.00715.39
7.0.320.0040.01115.18
7.0.310.0060.00614.93
7.0.300.0060.00615.00
7.0.290.0090.00315.18
7.0.280.0100.00315.28
7.0.270.0070.00715.23
7.0.260.0100.00315.07
7.0.250.0090.00015.01
7.0.240.0070.01014.93
7.0.230.0110.00715.13
7.0.220.0070.00715.20
7.0.210.0000.01015.24
7.0.200.0080.00215.93
7.0.190.0030.01015.25
7.0.180.0110.00714.90
7.0.170.0030.00915.04
7.0.160.0000.00915.15
7.0.150.0040.01115.26
7.0.140.0000.01315.11
7.0.130.0060.00615.45
7.0.120.0060.01015.13
7.0.110.0030.00615.13
7.0.100.0070.00714.80
7.0.90.0030.01415.23
7.0.80.0100.00715.38
7.0.70.0040.00415.02
7.0.60.0080.04217.28
7.0.50.0080.04316.38
7.0.40.0050.04016.79
7.0.30.0200.03316.47
7.0.20.0220.02116.60
7.0.10.0030.02716.60
7.0.00.0110.04216.51
5.6.400.0120.00614.29
5.6.390.0000.01513.87
5.6.380.0030.00613.96
5.6.370.0000.01014.14
5.6.360.0030.01014.24
5.6.350.0030.01114.18
5.6.340.0070.00513.91
5.6.330.0030.00614.30
5.6.320.0080.00314.02
5.6.310.0000.01414.41
5.6.300.0000.01514.35
5.6.290.0060.00613.70
5.6.280.0070.03017.59
5.6.270.0000.01614.19
5.6.260.0030.01514.04
5.6.250.0100.00314.19
5.6.240.0070.00413.99
5.6.230.0080.00613.50
5.6.220.0060.00613.79
5.6.210.0070.04417.40
5.6.200.0080.02216.14
5.6.190.0080.02317.29
5.6.180.2000.02217.18
5.6.170.0070.03717.08
5.6.160.0040.03117.13
5.6.150.0070.02915.97
5.6.140.0080.02116.02
5.6.130.0110.04216.19
5.6.120.0030.04617.40
5.6.110.0080.04417.43
5.6.100.0050.02517.69
5.6.90.0060.03517.53
5.6.80.0090.02217.08
5.6.70.0090.00613.73
5.6.60.0070.01013.87
5.6.50.0110.00413.98
5.6.40.0030.01013.75
5.6.30.0000.01414.07
5.6.20.0070.00713.78
5.6.10.0060.00613.77
5.6.00.0060.00914.10
5.5.380.0040.00414.15
5.5.370.0060.00914.06
5.5.360.0040.00713.86
5.5.350.0050.04617.06
5.5.340.0090.04516.10
5.5.330.0030.02817.23
5.5.320.0150.03717.17
5.5.310.0120.02417.18
5.5.300.0080.04215.93
5.5.290.0050.04715.97
5.5.280.0070.04417.32
5.5.270.0080.04517.27
5.5.260.0080.04517.53
5.5.250.0060.04817.36
5.5.240.0140.03917.19
5.5.230.0090.00613.66
5.5.220.0090.00713.99
5.5.210.0030.01314.00
5.5.200.0030.00913.86
5.5.190.0090.00613.94
5.5.180.0120.00314.05
5.5.170.0100.00313.88
5.5.160.0030.00613.95
5.5.150.0060.01214.11
5.5.140.0110.00314.00
5.5.130.0040.01513.84
5.5.120.0030.00713.67
5.5.110.0040.01113.47
5.5.100.0040.00713.91
5.5.90.0090.00613.70
5.5.80.0100.00013.75
5.5.70.0060.00313.75
5.5.60.0040.01113.76
5.5.50.0030.01013.77
5.5.40.0090.00913.70
5.5.30.0070.00713.98
5.5.20.0120.00313.72
5.5.10.0030.01313.63
5.5.00.0030.00913.89

preferences:
47.73 ms | 401 KiB | 5 Q