3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $string; public function __constructor(string $string) { $this->string = $string; } } function test_types(Person $person = null) { if ($person instanceof Person) { echo "TRUE"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UCmhc
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   1

Function test_types:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/UCmhc
function name:  test_types
number of ops:  5
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_INIT                                        !0      null
   13     1        INSTANCEOF                                               !0, 'Person'
          2      > JMPZ                                                     ~1, ->4
   14     3    >   ECHO                                                     'TRUE'
   16     4    > > RETURN                                                   null

End of function test_types

Class Person:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UCmhc
function name:  __constructor
number of ops:  4
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'string'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __constructor

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169 ms | 1393 KiB | 13 Q