3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scan = "00:12:a9:54:f6:a7,Privacy,-52.00,3Com,6,30:91:8f:24:07:d0,RSN: Privacy,-85.00,CenturyLink3873,1,00:0c:e5:46:2d:74,ShortSlotTime,-92.00,WLAN,1,c0:3f:0e:57:87:e8,RSN: Privacy,-94.00,Megan-PC-Wireless,6,00:12:a9:54:f6:a7,ShortPreamble,-45.00,WLAN,7"; $escan = (explode(",",$scan)); $cscan = (array_chunk($escan, 5)); class d_object { private $mac; var $enc; var $freq; var $ssid; var $channel; function __construct ($payload) { if (is_array($payload)) $this->from_array($payload); } public function from_array($array) { foreach(get_object_vars($this) as $attrName => $attrValue) $this->{$attrName} = $array[$attrName]; } public function s_output () { print "{$this->$mac}"; } } $device = new d_object($cscan); $device->s_output(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sv58f
function name:  (null)
number of ops:  18
compiled vars:  !0 = $scan, !1 = $escan, !2 = $cscan, !3 = $device
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '00%3A12%3Aa9%3A54%3Af6%3Aa7%2CPrivacy%2C-52.00%2C3Com%2C6%2C30%3A91%3A8f%3A24%3A07%3Ad0%2CRSN%3A+Privacy%2C-85.00%2CCenturyLink3873%2C1%2C00%3A0c%3Ae5%3A46%3A2d%3A74%2CShortSlotTime%2C-92.00%2CWLAN%2C1%2Cc0%3A3f%3A0e%3A57%3A87%3Ae8%2CRSN%3A+Privacy%2C-94.00%2CMegan-PC-Wireless%2C6%2C00%3A12%3Aa9%3A54%3Af6%3Aa7%2CShortPreamble%2C-45.00%2CWLAN%2C7'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        INIT_FCALL                                               'array_chunk'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 5
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   35    11        NEW                                              $9      'd_object'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !3, $9
   36    15        INIT_METHOD_CALL                                         !3, 's_output'
         16        DO_FCALL                                      0          
   38    17      > RETURN                                                   1

Class d_object:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/Sv58f
function name:  __construct
number of ops:  7
compiled vars:  !0 = $payload
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->6
   19     3    >   INIT_METHOD_CALL                                         'from_array'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   20     6    > > RETURN                                                   null

End of function __construct

Function from_array:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/Sv58f
function name:  from_array
number of ops:  14
compiled vars:  !0 = $array, !1 = $attrValue, !2 = $attrName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        INIT_FCALL                                               'get_object_vars'
          2        FETCH_THIS                                       ~3      
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                         $4      
          5      > FE_RESET_R                                       $5      $4, ->12
          6    > > FE_FETCH_R                                       ~6      $5, !1, ->12
          7    >   ASSIGN                                                   !2, ~6
   26     8        FETCH_DIM_R                                      ~9      !0, !2
          9        ASSIGN_OBJ                                               !2
         10        OP_DATA                                                  ~9
   25    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $5
   27    13      > RETURN                                                   null

End of function from_array

Function s_output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sv58f
function name:  s_output
number of ops:  4
compiled vars:  !0 = $mac
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   FETCH_OBJ_R                                      ~1      !0
          1        CAST                                          6  ~2      ~1
          2        ECHO                                                     ~2
   32     3      > RETURN                                                   null

End of function s_output

End of class d_object.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.16 ms | 1392 KiB | 19 Q