3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_filter(['one', 'two'], function($value) { return $value === 'two'; }); var_export($array[0]);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
Warning: Undefined array key 0 in /in/1grhk on line 4 NULL
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined offset: 0 in /in/1grhk on line 4 NULL
Output for 7.3.32 - 7.3.33
NULL

preferences:
68.08 ms | 408 KiB | 5 Q