3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface i1 { } class a { function find() { return null; } function _do(i1 $x) { var_dump("do".$x); } function main() { if ($this->n = $a->find() && _do($this->n)) { echo "yes"; } } } $a = new a(); $a->main();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kvVn
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'main'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class i1: [no user functions]
Class a:
Function find:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kvVn
function name:  find
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null
   10     1*     > RETURN                                                   null

End of function find

Function _do:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2kvVn
function name:  _do
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        CONCAT                                           ~1      'do', !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
   14     5      > RETURN                                                   null

End of function _do

Function main:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
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
Branch analysis from position: 9
filename:       /in/2kvVn
function name:  main
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_METHOD_CALL                                         !0, 'find'
          1        DO_FCALL                                      0  $2      
          2      > JMPZ_EX                                          ~3      $2, ->9
          3    >   INIT_FCALL_BY_NAME                                       '_do'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $4      'n'
          6        SEND_FUNC_ARG                                            $4
          7        DO_FCALL                                      0  $5      
          8        BOOL                                             ~3      $5
          9    >   ASSIGN_OBJ                                       ~1      'n'
         10        OP_DATA                                                  ~3
         11      > JMPZ                                                     ~1, ->13
   18    12    >   ECHO                                                     'yes'
   20    13    > > RETURN                                                   null

End of function main

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.21 ms | 1400 KiB | 15 Q