<?php declare(strict_types=1); $foo = new stdClass(); $foo->{"0"} = false; $foo->{0} = true; $foo = (array)$foo; echo json_encode($foo); // {"0":false,"0":true}
You have javascript disabled. You will not be able to edit any code.