Ask HN: Is PHP datatyping broken?
This gives an error:
<?php
$class = new StdClass();
$output = (null) $class;
var_dump($class);
This outputs an empty object: <?php $object = (Object) null; var_dump($object);
Why is this?!
This outputs an empty object: <?php $object = (Object) null; var_dump($object);
Why is this?!
1 comment
[ 3.8 ms ] story [ 14.8 ms ] threadAnd what do you think should happen in the second case? It looks normal to me.