3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = <<<JSON [ { "date": "21", "isHoliday": false, "value": 0 }, { "date": "22", "isHoliday": false, "value": 0 }, { "date": "23", "isHoliday": false, "value": 0 }, { "date": "24", "isHoliday": false, "value": 0 }, { "date": "25", "isHoliday": false, "value": 0 }, { "date": "26", "isHoliday": true, "value": 0 }, { "date": "27", "isHoliday": true, "value": 0 }, { "date": "28", "isHoliday": false, "value": 0 }, { "date": "29", "isHoliday": false, "value": 0 }, { "date": "30", "isHoliday": false, "value": 0 }, { "date": "31", "isHoliday": false, "value": 0 }, { "date": "1 июня", "isHoliday": false, "value": 0 }, { "date": "2", "isHoliday": true, "value": 0 }, { "date": "3", "isHoliday": true, "value": 0 }, { "date": "4", "isHoliday": false, "value": 0 }, { "date": "5", "isHoliday": false, "value": 0 }, { "date": "6", "isHoliday": false, "value": 0 }, { "date": "7", "isHoliday": false, "value": 0 }, { "date": "8", "isHoliday": false, "value": 0 }, { "date": "9", "isHoliday": true, "value": 0 }, { "date": "10", "isHoliday": true, "value": 0 }, { "date": "11", "isHoliday": false, "value": 0 }, { "date": "12", "isHoliday": false, "value": 0 }, { "date": "13", "isHoliday": false, "value": 0 }, { "date": "14", "isHoliday": false, "value": 0 }, { "date": "15", "isHoliday": false, "value": 0 }, { "date": "16", "isHoliday": true, "value": 0 }, { "date": "17", "isHoliday": true, "value": 0 }, { "date": "18", "isHoliday": false, "value": 0 }, { "date": "19", "isHoliday": false, "value": 0 }, { "date": "20", "isHoliday": false, "value": 0 }, { "date": "21", "isHoliday": false, "value": 0 }, { "date": "22", "isHoliday": false, "value": 0 }, { "date": "23", "isHoliday": true, "value": 0 }, { "date": "24", "isHoliday": true, "value": 0 }, { "date": "25", "isHoliday": false, "value": 0 }, { "date": "26", "isHoliday": false, "value": 0 }, { "date": "27", "isHoliday": false, "value": 0 }, { "date": "28", "isHoliday": false, "value": 0 }, { "date": "29", "isHoliday": false, "value": 0 }, { "date": "30", "isHoliday": true, "value": 0 }, { "date": "1 июля", "isHoliday": true, "value": 0 }, { "date": "2", "isHoliday": false, "value": 0 }, { "date": "3", "isHoliday": false, "value": 0 }, { "date": "4", "isHoliday": false, "value": 0 }, { "date": "5", "isHoliday": false, "value": 0 }, { "date": "6", "isHoliday": false, "value": 0 }, { "date": "7", "isHoliday": true, "value": 0 }, { "date": "8", "isHoliday": true, "value": 0 }, { "date": "9", "isHoliday": false, "value": 0 } ] JSON; $data = json_decode($json, true); var_dump(count($data) /7 );
based on 0quVO
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0beta1
float(7.1428571428571)