3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = substr("foo",3); if(strlen($foo) == 0){ echo "Run on both PHP 5 and PHP 7\n"; echo gettype($foo); //boolean on PHP 5 and string on PHP 7 }
based on RGY8N
Output for hhvm-3.15.4 - 3.17.3, 7.0.0 - 7.2.0
Run on both PHP 5 and PHP 7 string
Output for 5.6.0 - 5.6.30, hhvm-3.12.14
Run on both PHP 5 and PHP 7 boolean