3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class BeverageAbstract {} class Espresso extends BeverageAbstract {} class Mocha { public function __construct(BeverageAbstract $e) { echo $e instanceof BeverageAbstract; } } $espresso = new Espresso(); $mocha = new Mocha($espresso);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MqjgH
function name:  (null)
number of ops:  8
compiled vars:  !0 = $espresso, !1 = $mocha
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Espresso'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'Mocha'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
          7      > RETURN                                                   1

Class BeverageAbstract: [no user functions]
Class Espresso: [no user functions]
Class Mocha:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MqjgH
function name:  __construct
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INSTANCEOF                                       ~1      !0, 'BeverageAbstract'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function __construct

End of class Mocha.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.39 ms | 1393 KiB | 13 Q