3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ids = [1, 2, 'string']; array_filter($ids, function ($id) { $pass = is_numeric($id) && $id == (int) $id; assert($pass, $id . ' is not an integer'); return $pass; });
based on EUovM
Output for 5.4.8 - 7.3.1
Warning: assert(): string is not an integer failed in /in/7dae2 on line 7
Output for 5.4.2 - 5.4.7
Warning: assert() expects exactly 1 parameter, 2 given in /in/7dae2 on line 7 Warning: assert() expects exactly 1 parameter, 2 given in /in/7dae2 on line 7 Warning: assert() expects exactly 1 parameter, 2 given in /in/7dae2 on line 7
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7dae2 on line 3
Process exited with code 255.