3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filters = []; print_r(array_key_exists('ids', $filters) ? $filters['ids'] : $filters); print_r($filters['ids'] ?? $filters); $filters['ids'] = null; print_r(array_key_exists('ids', $filters) ? $filters['ids'] : $filters); print_r($filters['ids'] ?? $filters); $filters['ids'] = '123'; print_r(array_key_exists('ids', $filters) ? $filters['ids'] : $filters); print_r($filters['ids'] ?? $filters);
Output for hhvm-3.15.4, 7.0.0 - 7.2.6
Array ( ) Array ( ) Array ( [ids] => ) 123123
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '?' in /in/Y71BO on line 4
Process exited with code 255.