3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<<EOT battery.charge: 100 battery.runtime: 603 battery.type: PbAc device.mfr: EATON device.model: 5E 650i device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.data: MGE HID 1.39 driver.version.internal: 0.41 input.voltage: 223.0 outlet.1.status: on outlet.desc: Main Outlet outlet.id: 1 outlet.switchable: no output.frequency: 49.9 output.frequency.nominal: 50 output.voltage: 220.0 output.voltage.nominal: 230 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.firmware: 02.06.0017 ups.load: 40 ups.mfr: EATON ups.model: 5E 650i ups.power.nominal: 650 ups.productid: ffff ups.start.battery: yes ups.status: OL ups.timer.shutdown: -1 ups.vendorid: 0463 EOT; $output = explode("\n", $input); print_r(array_reduce($output, function($carry, $line) { list($key, $value) = explode(":", $line, 2); $carry[trim($key)] = trim($value); return $carry; }, []));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eQKGK
function name:  (null)
number of ops:  16
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'battery.charge%3A+100%0Abattery.runtime%3A+603%0Abattery.type%3A+PbAc%0Adevice.mfr%3A+EATON%0Adevice.model%3A+5E+650i%0Adevice.type%3A+ups%0Adriver.name%3A+usbhid-ups%0Adriver.parameter.pollfreq%3A+30%0Adriver.parameter.pollinterval%3A+2%0Adriver.parameter.port%3A+auto%0Adriver.parameter.synchronous%3A+no%0Adriver.version%3A+2.7.4%0Adriver.version.data%3A+MGE+HID+1.39%0Adriver.version.internal%3A+0.41%0Ainput.voltage%3A+223.0%0Aoutlet.1.status%3A+on%0Aoutlet.desc%3A+Main+Outlet%0Aoutlet.id%3A+1%0Aoutlet.switchable%3A+no%0Aoutput.frequency%3A+49.9%0Aoutput.frequency.nominal%3A+50%0Aoutput.voltage%3A+220.0%0Aoutput.voltage.nominal%3A+230%0Aups.beeper.status%3A+enabled%0Aups.delay.shutdown%3A+20%0Aups.firmware%3A+02.06.0017%0Aups.load%3A+40%0Aups.mfr%3A+EATON%0Aups.model%3A+5E+650i%0Aups.power.nominal%3A+650%0Aups.productid%3A+ffff%0Aups.start.battery%3A+yes%0Aups.status%3A+OL%0Aups.timer.shutdown%3A+-1%0Aups.vendorid%3A+0463'
   40     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   41     6        INIT_FCALL                                               'print_r'
          7        INIT_FCALL                                               'array_reduce'
          8        SEND_VAR                                                 !1
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeQKGK%3A41%240'
   46    10        SEND_VAL                                                 ~5
         11        SEND_VAL                                                 <array>
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FeQKGK%3A41%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eQKGK
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $carry, !1 = $line, !2 = $key, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   43     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%3A'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $4      
          7        FETCH_LIST_R                                     $5      $4, 0
          8        ASSIGN                                                   !2, $5
          9        FETCH_LIST_R                                     $7      $4, 1
         10        ASSIGN                                                   !3, $7
         11        FREE                                                     $4
   44    12        INIT_FCALL                                               'trim'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $9      
         15        INIT_FCALL                                               'trim'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $11     
         18        ASSIGN_DIM                                               !0, $9
         19        OP_DATA                                                  $11
   45    20      > RETURN                                                   !0
   46    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FeQKGK%3A41%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.44 ms | 1400 KiB | 21 Q