3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $max = "5"; $max = ($max ? $max + 1 : 1); var_dump($max); $max = "5"; $max = ($max ? (int)$max + 1 : 1); var_dump($max);
based on Cv25e
Output for 5.5.0 - 7.3.0rc3
int(6) int(6)