3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $messages = [['action', ['...']], new StdClass(), new StdClass(), ['action', ['...']], new StdClass(), ['action', ['...']]]; end($messages); do { $current = current($messages); if(is_object($current)) { print_r($current) ."\r"; echo 'break !!'."\r"; break; } echo 'iterate'."\r" . 'prev !'; prev($messages); } while(true);
based on 1e7Hl
Output for 5.6.0 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0rc4
iterate prev !stdClass Object ( ) break !!