3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo 'test1: '; echo '<h1>' + 'hello' + '</h1>'; echo "\n" . 'test2: '; echo '<h1>100' + 'hello' + '</h1>'; echo "\n" . 'test3: '; echo '<h1>' + '100' + '</h1>'; echo "\n" . 'test3: '; echo '<h1>100' . 'hello' . '</h1>'; echo "\n" . 'test4: '; echo '<h1>' . 'hello' . '</h1>';
based on 0osm0
Output for 7.1.0 - 7.2.0
test1: Warning: A non-numeric value encountered in /in/S5LdU on line 4 Warning: A non-numeric value encountered in /in/S5LdU on line 4 Warning: A non-numeric value encountered in /in/S5LdU on line 4 0 test2: Warning: A non-numeric value encountered in /in/S5LdU on line 6 Warning: A non-numeric value encountered in /in/S5LdU on line 6 Warning: A non-numeric value encountered in /in/S5LdU on line 6 0 test3: Warning: A non-numeric value encountered in /in/S5LdU on line 8 Warning: A non-numeric value encountered in /in/S5LdU on line 8 100 test3: <h1>100hello</h1> test4: <h1>hello</h1>
Output for 5.3.18 - 7.0.20
test1: 0 test2: 0 test3: 100 test3: <h1>100hello</h1> test4: <h1>hello</h1>