3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $success; private $id; public function pub($id) { $this->id = $id; $this->success = $this->test(); } private function test() { $getArg = $this->id; if ($getArg (is_numeric($getArg) || $getArg === 'test')) { return true; } return false; } } $a = new A(); $a->pub('1'); var_dump($a->success);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qldl6
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'pub'
          4        SEND_VAL_EX                                              '1'
          5        DO_FCALL                                      0          
   27     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~5      !0, 'success'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function pub:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qldl6
function name:  pub
number of ops:  8
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'id'
          2        OP_DATA                                                  !0
   11     3        INIT_METHOD_CALL                                         'test'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN_OBJ                                               'success'
          6        OP_DATA                                                  $3
   12     7      > RETURN                                                   null

End of function pub

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/Qldl6
function name:  test
number of ops:  15
compiled vars:  !0 = $getArg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~1      'id'
          1        ASSIGN                                                   !0, ~1
   17     2        INIT_DYNAMIC_CALL                                        !0
          3        INIT_FCALL                                               'is_numeric'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6      > JMPNZ_EX                                         ~4      $3, ->9
          7    >   IS_IDENTICAL                                     ~5      !0, 'test'
          8        BOOL                                             ~4      ~5
          9    >   SEND_VAL_EX                                              ~4
         10        DO_FCALL                                      0  $6      
         11      > JMPZ                                                     $6, ->13
   18    12    > > RETURN                                                   <true>
   21    13    > > RETURN                                                   <false>
   22    14*     > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.87 ms | 1400 KiB | 17 Q