3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 );
based on JHNu7
Output for 7.0.0 - 7.0.1
Fatal error: Illegal offset type in /in/SV3l8 on line 15
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Notice: Undefined variable: title in /in/SV3l8 on line 12 Warning: Illegal offset type in /in/SV3l8 on line 15 Notice: Undefined variable: userArray in /in/SV3l8 on line 23
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/SV3l8 on line 14
Process exited with code 255.