3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $num1 = '2oranges'; $num2 = '3oranges'; $sum = $num1 + $num2; echo "I ate {$sum} oranges today!" . PHP_EOL; $sumthing = $num1 + 5; echo "I ate {$sumthing} yesterday." . PHP_EOL;
based on 7WA5J
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/mPdj5 on line 4 Notice: A non well formed numeric value encountered in /in/mPdj5 on line 4 I ate 5 oranges today! Notice: A non well formed numeric value encountered in /in/mPdj5 on line 6 I ate 7 yesterday.
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.0.14
I ate 5 oranges today! I ate 7 yesterday.
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/mPdj5 on line 5 I ate 5 oranges today!PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/mPdj5 on line 7 I ate 7 yesterday.PHP_EOL