3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_string = '{"options": [ { "optionID" : 123 }, { "optionID" : 456 }, { "optionID" : 789 } ]}'; $idpassed = 123; $options = json_decode($json_string, 1)['options']; if (array_search($idpassed, array_column($options, 'optionID')) !== FALSE) { echo "the option exists!"; } else { echo "the option does not exist!"; }

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.0090.00916.54
8.5.00.0140.00719.56
8.4.150.0020.00014.05
8.4.140.0120.00917.36
8.4.130.0130.00717.72
8.4.120.0130.00720.55
8.4.110.0080.00618.96
8.4.100.0130.00918.67
8.4.90.0110.00820.63
8.4.80.0080.01118.82
8.4.70.0060.01317.79
8.4.60.0050.00918.92
8.4.50.0050.00920.48
8.4.40.0030.01617.53
8.4.30.0160.00318.63
8.4.20.0140.00717.88
8.4.10.0140.00721.34
8.3.280.0140.00620.13
8.3.270.0050.00416.48
8.3.260.0070.01116.61
8.3.250.0120.00617.21
8.3.240.0110.00816.54
8.3.230.0110.01016.28
8.3.220.0090.00718.96
8.3.210.0080.00616.76
8.3.200.0060.00216.62
8.3.190.0110.00717.20
8.3.180.0090.00617.30
8.3.170.0120.00618.59
8.3.160.0040.00418.03
8.3.150.0090.00917.05
8.3.140.0130.00618.35
8.3.130.0160.00318.33
8.3.120.0090.00618.96
8.3.110.0050.00516.46
8.3.100.0060.00316.43
8.3.90.0070.00426.77
8.3.80.0030.00616.50
8.3.70.0140.00318.18
8.3.60.0120.00318.43
8.3.50.0150.00524.35
8.3.40.0060.00921.89
8.3.30.0110.00418.86
8.3.20.0020.00524.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0060.00220.37
8.2.280.0110.00918.26
8.2.270.0080.00017.45
8.2.260.0080.00016.66
8.2.250.0060.00316.58
8.2.240.0100.01016.46
8.2.230.0050.00320.94
8.2.220.0070.00324.06
8.2.210.0040.00426.77
8.2.200.0060.00616.50
8.2.190.0030.01016.63
8.2.180.0070.00725.92
8.2.170.0040.01118.87
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.28
8.2.110.0070.00320.91
8.2.100.0040.00817.84
8.2.90.0030.00718.03
8.2.80.0080.00018.16
8.2.70.0060.00317.91
8.2.60.0040.00418.34
8.2.50.0040.00418.10
8.2.40.0020.00519.42
8.2.30.0000.00719.19
8.2.20.0050.00218.08
8.2.10.0040.00419.18
8.2.00.0040.00419.17
8.1.330.0150.00416.13
8.1.320.0120.00918.00
8.1.310.0040.00417.84
8.1.300.0110.00719.89
8.1.290.0000.01030.84
8.1.280.0100.01025.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.06
8.1.230.0040.00722.66
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0060.00317.10
8.1.180.0000.00918.10
8.1.170.0040.00418.44
8.1.160.0020.00519.02
8.1.150.0000.00718.89
8.1.140.0050.00318.73
8.1.130.0050.00320.14
8.1.120.0040.00417.42
8.1.110.0000.00817.42
8.1.100.0000.00717.37
8.1.90.0040.00417.42
8.1.80.0000.01017.29
8.1.70.0000.00717.43
8.1.60.0040.00417.44
8.1.50.0060.00317.47
8.1.40.0090.00017.46
8.1.30.0030.00517.61
8.1.20.0000.00817.61
8.1.10.0000.00817.48
8.1.00.0040.00417.41
8.0.300.0040.00422.03
8.0.290.0000.00816.75
8.0.280.0030.00318.49
8.0.270.0070.00016.84
8.0.260.0000.00618.48
8.0.250.0000.00716.91
8.0.240.0060.00016.80
8.0.230.0040.00316.75
8.0.220.0000.00716.77
8.0.210.0030.00316.84
8.0.200.0030.00316.88
8.0.190.0000.00716.77
8.0.180.0070.00016.84
8.0.170.0040.00416.86
8.0.160.0040.00416.71
8.0.150.0030.00416.74
8.0.140.0090.00016.71
8.0.130.0000.00513.27
8.0.120.0030.00516.68
8.0.110.0030.00316.71
8.0.100.0070.00016.71
8.0.90.0000.00716.88
8.0.80.0080.01016.84
8.0.70.0070.00016.70
8.0.60.0070.00016.67
8.0.50.0070.00016.71
8.0.30.0070.01017.00
8.0.20.0080.01116.95
8.0.10.0020.00516.84
8.0.00.0130.01016.79
7.4.330.0000.00515.55
7.4.320.0060.00016.46
7.4.300.0000.00616.53
7.4.290.0030.00316.54
7.4.280.0030.00516.58
7.4.270.0000.00716.43
7.4.260.0030.00313.27
7.4.250.0050.00216.39
7.4.240.0080.00016.52
7.4.230.0030.00316.41
7.4.220.0050.00216.51
7.4.210.0070.00916.65
7.4.200.0000.00716.34
7.4.130.0170.00316.42
7.4.120.0200.01016.49
7.4.110.0090.01516.40
7.4.100.0190.00616.34
7.4.90.0140.00516.34
7.4.80.0180.00316.61
7.4.70.0040.01716.61
7.4.60.0080.01116.51
7.4.50.0140.00916.59
7.4.40.0200.00916.48
7.4.30.0150.00816.43
7.4.20.0180.00516.53
7.4.10.0130.00516.61
7.4.00.0120.00616.43
7.3.330.0030.00316.34
7.3.320.0030.00313.07
7.3.310.0070.00016.12
7.3.300.0000.00616.18
7.3.290.0080.00916.29
7.3.260.0100.01416.34
7.3.250.0130.01416.33
7.3.240.0160.01216.25
7.3.230.0130.01616.38
7.3.220.0090.00916.33
7.3.210.0090.01216.31
7.3.200.0180.00316.39
7.3.190.0140.00816.20
7.3.180.0060.01316.55
7.3.170.0100.01716.18
7.3.160.0160.00316.26
7.3.150.0170.01016.40
7.3.140.0160.00316.20
7.3.130.0180.00016.30
7.3.120.0100.01016.41
7.3.110.0130.00616.52
7.3.100.0170.00416.28
7.3.90.0120.00816.27
7.3.80.0100.00616.28
7.3.70.0120.00616.21
7.3.60.0070.01016.17
7.3.50.0040.01216.23
7.3.40.0130.00316.30
7.3.30.0040.01316.26
7.3.20.0150.00416.28
7.3.10.0220.00016.23
7.3.00.0110.01016.35

preferences:
164.88 ms | 403 KiB | 5 Q