3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isJson($string) { $decoded = json_decode($string); return (json_last_error() == JSON_ERROR_NONE); } if ( isJson(123) ) { echo "valid JSON"; } else { echo "not valid JSON"; }

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.130.0090.00018.38
8.3.120.0050.00520.68
8.3.110.0070.01420.94
8.3.100.0090.00024.06
8.3.90.0060.00326.77
8.3.80.0040.00817.97
8.3.70.0100.00716.63
8.3.60.0110.00718.43
8.3.50.0140.00717.26
8.3.40.0070.00718.85
8.3.30.0040.01218.41
8.3.20.0040.00420.77
8.3.10.0060.00318.82
8.3.00.0040.00421.87
8.2.250.0060.00918.34
8.2.240.0060.00317.15
8.2.230.0070.01122.58
8.2.220.0040.00437.54
8.2.210.0110.00826.77
8.2.200.0100.00716.50
8.2.190.0120.00316.58
8.2.180.0060.00925.92
8.2.170.0110.00422.96
8.2.160.0160.00320.39
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.54
8.2.110.0040.00420.52
8.2.100.0090.00317.78
8.2.90.0030.00617.84
8.2.80.0040.00419.09
8.2.70.0040.00418.03
8.2.60.0000.00818.22
8.2.50.0090.00019.21
8.2.40.0050.00321.06
8.2.30.0040.00418.07
8.2.20.0040.00417.83
8.2.10.0000.01018.81
8.2.00.0030.00319.35
8.1.300.0100.00717.63
8.1.290.0040.00730.84
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00017.23
8.1.230.0060.00621.02
8.1.220.0000.00717.74
8.1.210.0040.00418.97
8.1.200.0040.00417.22
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0050.00520.42
8.1.160.0040.00418.80
8.1.150.0000.00818.67
8.1.140.0060.00320.58
8.1.130.0030.00317.38
8.1.120.0040.00417.43
8.1.110.0000.00717.41
8.1.100.0040.00417.51
8.1.90.0070.00317.38
8.1.80.0000.00917.45
8.1.70.0000.00717.46
8.1.60.0040.00417.58
8.1.50.0030.00517.40
8.1.40.0000.00717.52
8.1.30.0050.00617.69
8.1.20.0030.00517.55
8.1.10.0000.00817.50
8.1.00.0030.00617.41
8.0.300.0040.00419.91
8.0.290.0040.00416.75
8.0.280.0050.00218.43
8.0.270.0000.00717.25
8.0.260.0030.00317.25
8.0.250.0070.00016.91
8.0.240.0070.00016.73
8.0.230.0030.00316.77
8.0.220.0050.00516.82
8.0.210.0030.00316.71
8.0.200.0000.00616.88
8.0.190.0040.00416.82
8.0.180.0030.00316.73
8.0.170.0040.00416.84
8.0.160.0040.00416.70
8.0.150.0030.00416.78
8.0.140.0000.01116.80
8.0.130.0060.00013.27
8.0.120.0030.00516.78
8.0.110.0070.00016.88
8.0.100.0030.00516.87
8.0.90.0040.00416.72
8.0.80.0080.00716.95
8.0.70.0000.00716.74
8.0.60.0080.00016.91
8.0.50.0000.00716.93
8.0.30.0150.00717.00
8.0.20.0130.01016.82
8.0.10.0000.00816.84
8.0.00.0120.00716.82
7.4.330.0000.00415.55
7.4.320.0000.00616.42
7.4.300.0040.00416.41
7.4.290.0000.00716.38
7.4.280.0040.00416.55
7.4.270.0040.00416.57
7.4.260.0040.00416.60
7.4.250.0070.00016.59
7.4.240.0030.00316.61
7.4.230.0030.00316.46
7.4.220.0000.00816.48
7.4.210.0050.01316.45
7.4.200.0000.00716.62
7.4.140.0090.00917.86
7.4.130.0110.00816.30
7.4.120.0090.00916.48
7.4.110.0100.00616.63
7.4.100.0070.01816.57
7.4.90.0070.01616.50
7.4.80.0100.00719.39
7.4.70.0070.01016.50
7.4.60.0080.00816.48
7.4.50.0030.01016.27
7.4.40.0120.01216.50
7.4.00.0050.01114.75
7.3.330.0000.00513.24
7.3.320.0000.00613.20
7.3.310.0040.00416.27
7.3.300.0030.00316.19
7.3.290.0050.00216.16
7.3.280.0110.00316.23
7.3.260.0100.00816.50
7.3.240.0090.00916.44
7.3.230.0150.00616.34
7.3.210.0110.00616.21
7.3.200.0120.01116.60
7.3.190.0160.00816.23
7.3.180.0130.01016.51
7.3.170.0090.01516.25
7.3.160.0070.01016.59
7.3.120.0070.00915.89
7.3.110.0090.00815.34
7.3.100.0090.00715.36
7.3.90.0080.00615.31
7.3.80.0080.00715.19
7.3.70.0060.00915.30
7.3.60.0060.01015.26
7.3.50.0040.01115.11
7.3.40.0070.00915.02
7.3.30.0100.00615.10
7.3.20.0100.00715.13
7.3.10.0110.00615.17
7.3.00.0150.00615.13
7.2.330.0070.01416.73
7.2.320.0050.01316.30
7.2.310.0040.01716.46
7.2.300.0090.00916.73
7.2.290.0090.00616.74
7.2.250.0040.01114.76
7.2.240.0060.01015.50
7.2.230.0110.00415.56
7.2.220.0050.00915.48
7.2.210.0060.00915.29
7.2.200.0070.00815.47
7.2.190.0060.00915.52
7.2.180.0060.00915.31
7.2.170.0050.00915.28
7.2.160.0080.00715.16
7.2.150.0090.00915.33
7.2.140.0100.00815.32
7.2.130.0110.01115.38
7.2.120.0140.00815.37
7.2.110.0130.00915.36
7.2.100.0130.00715.24
7.2.90.0080.01115.36
7.2.80.0090.00815.31
7.2.70.0110.00815.28
7.2.60.0200.01015.35
7.2.50.0110.00715.31
7.2.40.0120.00915.26
7.2.30.0130.00815.30
7.2.20.0110.00715.34
7.2.10.0110.00815.27
7.2.00.0100.01115.33
7.1.330.0070.00714.62
7.1.320.0080.00614.73
7.1.310.0060.00814.71
7.1.300.0050.01014.65
7.1.290.0080.00614.76
7.1.280.0100.00914.37
7.1.270.0120.00714.36
7.1.260.0200.00614.36
7.1.250.0100.00914.37
5.4.10.0060.00212.67
5.2.00.0000.00611.68
5.0.50.0020.00410.07
4.4.30.0020.0019.83

preferences:
26.85 ms | 403 KiB | 5 Q