3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json=<<<EOF [ { "id":23, "uid":"0090000219", "cid":"0090000013", "extension":"201", "secret":"Myojyo42_f", "leader":true, "simultaneous":false, "confbridge_id":17, "created_at":"2015-09-02 12:49:12", "updated_at":"2015-09-02 12:49:12" }, { "id":24, "uid":"0090000221", "cid":"0090000013", "extension":"203", "secret":"Myojyo42_f", "leader":false, "simultaneous":false, "confbridge_id":17, "created_at":"2015-09-02 12:49:12", "updated_at":"2015-09-02 12:49:12" }, { "id":25, "uid":"0090000223", "cid":"0090000013", "extension":"205", "secret":"Myojyo42_f", "leader":true, "simultaneous":false, "confbridge_id":17, "created_at":"2015-09-10 10:16:24", "updated_at":"2015-09-10 10:16:24" } ] EOF; $decoded = json_decode($json, true); foreach($decoded as $key => $val) { if($val['leader'] == 1) { echo count($val['leader']); } //if you want also to count the false then add else in the statement echo count($val['leader']); }

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.0150.00618.68
8.3.50.0070.01116.20
8.3.40.0100.01018.71
8.3.30.0070.01018.89
8.3.20.0060.00320.33
8.3.10.0050.00323.66
8.3.00.0060.00322.41
8.2.180.0090.00916.75
8.2.170.0070.01122.96
8.2.160.0130.00019.33
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0100.00017.63
8.2.110.0120.00622.00
8.2.100.0070.00617.89
8.2.90.0000.00817.88
8.2.80.0080.00018.73
8.2.70.0050.00317.80
8.2.60.0030.00517.74
8.2.50.0000.00917.59
8.2.40.0100.00517.62
8.2.30.0060.00320.00
8.2.20.0060.00317.88
8.2.10.0040.00418.18
8.2.00.0050.00318.00
8.1.280.0070.00725.92
8.1.270.0030.00620.38
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0040.00423.80
8.1.230.0040.00818.93
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0040.00417.48
8.1.190.0040.00817.35
8.1.180.0050.00318.10
8.1.170.0050.00218.84
8.1.160.0050.00221.94
8.1.150.0070.00018.77
8.1.140.0040.00417.51
8.1.130.0000.00817.65
8.1.120.0050.00317.55
8.1.110.0000.00817.48
8.1.100.0030.00517.52
8.1.90.0050.00317.35
8.1.80.0030.00817.48
8.1.70.0020.00517.40
8.1.60.0070.00317.64
8.1.50.0040.00417.47
8.1.40.0000.00817.56
8.1.30.0030.00617.62
8.1.20.0050.00317.65
8.1.10.0030.01117.45
8.1.00.0040.00417.51
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0070.00018.39
8.0.270.0020.00516.89
8.0.260.0000.00617.38
8.0.250.0050.00217.04
8.0.240.0040.00417.11
8.0.230.0030.00316.96
8.0.220.0000.00716.98
8.0.210.0070.00016.99
8.0.200.0000.00716.98
8.0.190.0000.00717.08
8.0.180.0000.00716.81
8.0.170.0050.00316.87
8.0.160.0050.00317.00
8.0.150.0000.00716.82
8.0.140.0000.00716.82
8.0.130.0060.00313.45
8.0.120.0050.00316.88
8.0.110.0040.00416.88
8.0.100.0040.00416.92
8.0.90.0000.00816.93
8.0.80.0090.01217.04
8.0.70.0000.00716.84
8.0.60.0040.00417.08
8.0.50.0040.00416.86
8.0.30.0120.00517.14
8.0.20.0100.00917.40
8.0.10.0000.00816.96
8.0.00.0120.00716.85
7.4.330.0020.00215.10
7.4.320.0030.00316.50
7.4.300.0030.00316.61
7.4.290.0060.00316.52
7.4.280.0000.00816.40
7.4.270.0080.00016.45
7.4.260.0050.00316.63
7.4.250.0070.00016.40
7.4.240.0020.00616.54
7.4.230.0040.00416.70
7.4.220.0060.00916.59
7.4.210.0100.01016.71
7.4.200.0030.00316.63
7.4.160.0100.00616.67
7.4.150.0090.00917.40
7.4.140.0190.00617.86
7.4.130.0060.01216.63
7.4.120.0080.01016.54
7.4.110.0030.01416.57
7.4.100.0160.00716.54
7.4.90.0100.00716.59
7.4.80.0100.01019.39
7.4.70.0110.01116.57
7.4.60.0030.01316.37
7.4.50.0030.00516.34
7.4.40.0060.00916.61
7.4.30.0100.01016.37
7.4.00.0070.00715.05
7.3.330.0060.00013.13
7.3.320.0000.00513.14
7.3.310.0000.00716.42
7.3.300.0040.00416.35
7.3.290.0070.01116.35
7.3.280.0150.01416.34
7.3.270.0100.00717.40
7.3.260.0110.00616.58
7.3.250.0110.00616.60
7.3.240.0090.00916.60
7.3.230.0150.00916.39
7.3.210.0120.00416.57
7.3.200.0030.01319.39
7.3.190.0000.01616.43
7.3.180.0040.01216.52
7.3.170.0090.00916.40
7.3.160.0060.01116.38
7.2.330.0160.00516.38
7.2.320.0090.00916.69
7.2.310.0160.00016.45
7.2.300.0070.01016.54
7.2.290.0120.01216.79
7.2.60.0040.01116.86
7.2.00.0000.01519.37
7.1.200.0030.01215.96
7.1.100.0030.00918.00
7.1.70.0030.00617.16
7.1.60.0100.01420.03
7.1.50.0090.01216.70
7.1.00.0000.07722.51
7.0.200.0310.01014.97
7.0.60.0100.07019.95
7.0.50.0000.05717.73
7.0.40.0070.06020.07
7.0.30.0270.08020.17
7.0.20.0070.05020.00
7.0.10.0030.09020.01
7.0.00.0070.07720.16
5.6.280.0070.06021.02
5.6.210.0100.08020.63
5.6.200.0070.08018.18
5.6.190.0100.07720.41
5.6.180.0300.05020.35
5.6.170.0300.04320.41
5.6.160.0100.08320.54
5.6.150.0030.08718.21
5.6.140.0030.09018.27
5.6.130.0070.08018.14
5.6.120.0070.08321.00
5.6.110.0130.08321.11
5.6.100.0030.07321.13
5.6.90.0030.07320.98
5.6.80.0000.08020.35
5.6.70.4170.04720.38
5.5.350.0370.07020.40
5.5.340.0030.08018.03
5.5.330.0070.04320.21
5.5.320.0270.06020.30
5.5.310.0400.06320.20
5.5.300.0030.08317.92
5.5.290.0030.08317.92
5.5.280.0100.07720.75
5.5.270.0070.03720.97
5.5.260.0100.05720.72
5.5.250.0000.04720.68
5.5.240.4200.04020.15
5.4.450.0630.06019.61
5.4.440.0770.05719.52
5.4.430.0770.05019.47
5.4.420.0670.05319.48
5.4.410.0830.05718.97
5.4.400.0730.04319.12
5.4.390.0700.06719.21
5.4.380.0970.04719.32
5.4.370.0770.04719.18
5.4.360.0600.06319.31
5.4.350.0500.06018.95
5.4.340.0330.04319.16
5.4.320.0100.05718.95
5.4.310.0030.05718.99
5.4.300.0670.06319.15
5.4.290.0730.05318.80
5.4.280.0800.06019.12
5.4.270.0870.04318.99
5.4.260.0570.05719.25
5.4.250.0770.05019.14
5.4.240.0670.05019.29
5.4.230.0630.05319.25
5.4.220.0700.06019.30
5.4.210.0570.06019.27
5.4.200.0700.06016.82
5.4.190.0530.06319.07
5.4.180.0800.04719.25
5.4.170.0670.05719.27
5.4.160.0500.05319.17
5.4.150.0870.04718.93
5.4.140.0630.05016.43
5.4.130.0530.05716.43
5.4.120.0670.05316.43
5.4.110.0600.04716.42
5.4.100.0630.06316.27
5.4.90.0730.06716.34
5.4.80.0730.04716.42
5.4.70.0630.05016.30
5.4.60.0030.05016.32
5.4.50.0170.04716.38
5.4.40.0130.05716.43
5.4.30.0170.03716.19
5.4.20.0330.06016.20

preferences:
42.43 ms | 400 KiB | 5 Q