3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mVar = '1'; $bVar = (bool)$mVar; //cast bool to in echo var_dump($mVar); var_dump($bVar);
based on MWalZ
Output for 4.3.0 - 7.1.0
string(1) "1" bool(true)