3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class base { final public function check($obj) { var_dump($obj instanceof $this); var_dump($obj); var_dump($this); } } class test extends base {} $test = 'test'; $test= new $test; $test->check($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oVjM5
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'test'
   18     1        FETCH_CLASS                                   0  $2      !0
          2        NEW                                              $3      $2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   20     5        INIT_METHOD_CALL                                         !0, 'check'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class base:
Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oVjM5
function name:  check
number of ops:  15
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        FETCH_THIS                                       ~1      
          3        FETCH_CLASS                                   0  $2      ~1
          4        INSTANCEOF                                       ~3      !0, $2
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'var_dump'
         11        FETCH_THIS                                       ~6      
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
    8    14      > RETURN                                                   null

End of function check

End of class base.

Class test:
Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oVjM5
function name:  check
number of ops:  15
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        FETCH_THIS                                       ~1      
          3        FETCH_CLASS                                   0  $2      ~1
          4        INSTANCEOF                                       ~3      !0, $2
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'var_dump'
         11        FETCH_THIS                                       ~6      
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
    8    14      > RETURN                                                   null

End of function check

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.18 ms | 1405 KiB | 15 Q