3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $typeTest = 'MRC'; $this->conf['testMappings'][$typeTest] = array( 'ENE44BA0023' => /* ENEL CERM1 BID2 */ array( 'MeterType' => array( 'enel_measure_name' => 'Meter Type', 'force_measure' => 'CERM1', 'in_header' => true), 'HardVersion' => array('enel_measure_name' => 'hw version', 'in_header' => true), 'SoftVersion' => array('enel_measure_name' => 'sw version', 'in_header' => true), 'RelayVoltage' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose_1' => array('enel_measure_name' => 'Close Relay dsfgsdfgdsf', 'resolver' => function () {return 'TEST';}), 'MeasureOp2_1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus_12' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen_1' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultOpen' => array('enel_measure_name' => 'Open Relay'), 'MeasureOp1' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), 'ResultClose' => array('enel_measure_name' => 'Close Relay'), 'MeasureOp2' => array('enel_measure_name' => 'RelayVoltage'), 'relaystatus' => array('enel_measure_name' => 'RelayStatus'), ), ); var_dump($this->conf['testMappings'][$typeTest]['ENE44BA0023']);
based on VbkNu
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Using $this when not in object context in /in/3jXMf:5 Stack trace: #0 {main} thrown in /in/3jXMf on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: $this is null in /in/3jXMf:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Using $this when not in object context in /in/3jXMf on line 5
Process exited with code 255.