3v4l.org

run code in 300+ PHP versions simultaneously
<?php $payload = new stdClass(); $android = new stdClass(); $android->title = "test cafe"; $android->payload = array( ['$state'] => "base.messages" ); $ios = new stdClass(); $ios->title = $title; $ios->payload = array( ['$state'] => "base.messages" ); $notification = new stdClass(); $notification->alert = "title"; $notification->android = $android; $notification->ios = $ios; $data = array( "user_ids" => $userArray, "notification" => $notification );
Output for 7.0.0 - 7.0.1
Fatal error: Illegal offset type in /in/JHNu7 on line 8
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Warning: Illegal offset type in /in/JHNu7 on line 8 Notice: Undefined variable: title in /in/JHNu7 on line 12 Warning: Illegal offset type in /in/JHNu7 on line 15 Notice: Undefined variable: userArray in /in/JHNu7 on line 23

preferences:
176.34 ms | 1395 KiB | 36 Q