3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pawshake_notification_add($notification_type, $external_id, $uid = 0, $expire = -1, $variables = array()) { $notification = array( 'created' => REQUEST_TIME, 'notification_type' => $notification_type, 'external_id' => $external_id, 'variables' => $variables, ); // User id is optional. if ($uid) { $notification['uid'] = $uid; } // If no expire is send, default to one day. if ($expire == -1) { $notification['expire'] = REQUEST_TIME + 86400; } print_r($notification); } $expire = time() + 86400 + 86400; pawshake_notification_add('thread_start', $message->thread_id, 0, $expire);
Output for 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Notice: Undefined variable: message in /in/dpd2V on line 26 Notice: Trying to get property 'thread_id' of non-object in /in/dpd2V on line 26 Warning: Use of undefined constant REQUEST_TIME - assumed 'REQUEST_TIME' (this will throw an Error in a future version of PHP) in /in/dpd2V on line 6 Array ( [created] => REQUEST_TIME [notification_type] => thread_start [external_id] => [variables] => Array ( ) )
Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Notice: Undefined variable: message in /in/dpd2V on line 26 Notice: Trying to get property of non-object in /in/dpd2V on line 26 Notice: Use of undefined constant REQUEST_TIME - assumed 'REQUEST_TIME' in /in/dpd2V on line 6 Array ( [created] => REQUEST_TIME [notification_type] => thread_start [external_id] => [variables] => Array ( ) )
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: message in /in/dpd2V on line 26 Notice: Trying to get property of non-object in /in/dpd2V on line 26 Notice: Use of undefined constant REQUEST_TIME - assumed 'REQUEST_TIME' in /in/dpd2V on line 6 Array ( [created] => REQUEST_TIME [notification_type] => thread_start [external_id] => [variables] => Array ( ) )
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
Notice: Undefined variable: message in /in/dpd2V on line 26 Notice: Use of undefined constant REQUEST_TIME - assumed 'REQUEST_TIME' in /in/dpd2V on line 6 Array ( [created] => REQUEST_TIME [notification_type] => thread_start [external_id] => [variables] => Array ( ) )

preferences:
192.45 ms | 402 KiB | 317 Q