3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( 'report_id' => (int) $r['report_id'], 'openDate' => self::isoDate($r['open_date']? $r['open_date'] : '2015-09-08 12:06:00'), 'openedBy' => $r['opened_by']? (int) $r['opened_by'] : 42, 'response' => array( 'text' => $r['answer'], 'creationDate' => self::isoDate($r['answer_date']), 'author' => (int) $r['account_id'] ), 'credits' => array( 'member_id' => (int) $r['member_id'], 'campaign_id' => (int) $r['project_id'], 'category' => (empty($r['points_category']))? 5: 5, 'description' => $r['points_reason'], 'date' => self::isoDate($r['answer_date']), 'amount' => $r['points'] ) ); //if(!empty($r['publish'])) { array_merge ($data, array('published'=> $r['publish'])); //} die(var_dump($data));
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: r in /in/9amcW on line 4 Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /in/9amcW:5 Stack trace: #0 {main} thrown in /in/9amcW on line 5
Process exited with code 255.
Output for 5.3.17 - 5.6.28
Notice: Undefined variable: r in /in/9amcW on line 4 Fatal error: Cannot access self:: when no class scope is active in /in/9amcW on line 5
Process exited with code 255.