3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 3 / 2; $b = (int) $a; var_dump(PHP_INT_SIZE); var_dump($a); var_dump($b);
based on 76CTr
Output for 4.4.0 - 4.4.9, 5.0.5 - 7.1.0
int(8) float(1.5) int(1)
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
Notice: Use of undefined constant PHP_INT_SIZE - assumed 'PHP_INT_SIZE' in /in/d8oP6 on line 5 string(12) "PHP_INT_SIZE" float(1.5) int(1)