3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { public function setData() { return $this; } } class UserModel extends Model { } $user = (new UserModel())->setData(); var_dump($user instanceof UserModel); var_dump($user instanceof Model);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XJrOc
function name:  (null)
number of ops:  14
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'UserModel'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'setData'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   16     5        INIT_FCALL                                               'var_dump'
          6        INSTANCEOF                                       ~5      !0, 'UserModel'
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'var_dump'
         10        INSTANCEOF                                       ~7      !0, 'Model'
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Model:
Function setdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XJrOc
function name:  setData
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function setdata

End of class Model.

Class UserModel:
Function setdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XJrOc
function name:  setData
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function setdata

End of class UserModel.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.25 ms | 1395 KiB | 15 Q