3v4l.org

run code in 300+ PHP versions simultaneously
<?php class API { public static function get_promotion_widgets() { } } foreach ( Api::get_promotion_widgets() as $widget_data ) { /*$manager->register( new Widgets\Pro_Widget_Promotion( [], [ 'widget_name' => $widget_data['name'], 'widget_title' => $widget_data['title'], ] ) );*/ }
Output for 8.0.0, 8.1.30 - 8.1.33, 8.2.21 - 8.2.29, 8.3.5 - 8.3.27, 8.4.1 - 8.4.14
Warning: foreach() argument must be of type array|object, null given in /in/bQbWN on line 9
Output for 7.4.33
Warning: Invalid argument supplied for foreach() in /in/bQbWN on line 9

preferences:
77.08 ms | 406 KiB | 5 Q