3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function miauw() { static $count = 1; static $count = 2; return $count++; } for ($i = 0; $i < 42; ++$i) { echo miauw(), PHP_EOL; } echo miauw(), PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
2 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL4 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL5 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL6 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL7 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL8 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL9 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL10 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL11 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL12 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL13 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL14 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL15 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL16 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL17 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL18 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL19 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL20 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL21 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL22 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL23 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL24 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL25 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL26 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL27 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL28 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL29 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL30 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL31 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL32 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL33 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL34 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL35 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL36 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL37 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL38 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL39 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL40 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL41 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL42 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL43 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 10 PHP_EOL44 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jiS5s on line 12 PHP_EOL