3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('error_reporting', -1); ini_set('display_errors', 'on'); class Foo { private static $a; public function __construct() { self::$a = range('A', 'Z'); } public function generator() { foreach(self::$a as $i){ yield array_reverse(array_pop($i)); } } } $foo = new Foo; $generator = $foo->generator(); if ($generator->valid()) { foreach($generator as $i) { echo $i; } } else { echo 'Nothing'; } $generator = $foo->generator(); if ($generator->valid()) { foreach($generator as $i) { echo $i; } } else { echo 'Nothing'; }
based on EVJOa
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be array, string given in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19
Output for hhvm-3.15.4
Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19 Warning: array_pop() expects parameter 1 to be an array or mutable collection in /in/uCECf on line 19 Warning: array_reverse() expects parameter 1 to be array, null given in /in/uCECf on line 19