3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Se { public $data1; public function setData(array $data){ if (empty($data)) { throw new InvalidArgumentException('The name of an employee cannot be empty.'); } $data1 = $data; $data1 = array_values($data1); var_dump($data1); } public function getE(){ return $data1; } }; $tmpaaa= array('3333','222'); $ttt = new Se(); $ttt->setData($tmpaaa); echo $ttt->getE();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e95HC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $tmpaaa, !1 = $ttt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ASSIGN                                                   !0, <array>
   27     1        NEW                                              $3      'Se'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   28     4        INIT_METHOD_CALL                                         !1, 'setData'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   30     7        INIT_METHOD_CALL                                         !1, 'getE'
          8        DO_FCALL                                      0  $7      
          9        ECHO                                                     $7
         10      > RETURN                                                   1

Class Se:
Function setdata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e95HC
function name:  setData
number of ops:  16
compiled vars:  !0 = $data, !1 = $data1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ISSET_ISEMPTY_CV                                         !0
          2      > JMPZ                                                     ~2, ->7
    8     3    >   NEW                                              $3      'InvalidArgumentException'
          4        SEND_VAL_EX                                              'The+name+of+an+employee+cannot+be+empty.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $3
   11     7    >   ASSIGN                                                   !1, !0
   12     8        INIT_FCALL                                               'array_values'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !1, $6
   13    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   15    15      > RETURN                                                   null

End of function setdata

Function gete:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e95HC
function name:  getE
number of ops:  2
compiled vars:  !0 = $data1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   !0
   21     1*     > RETURN                                                   null

End of function gete

End of class Se.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.79 ms | 1396 KiB | 17 Q