3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(~E_ALL); function verify(\ArrayAccess $x) { if (!($x instanceof \ArrayAccess)) { echo "You gave me a malformed object!"; } } $a = new \stdClass(); verify($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0RoeT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -32768
          2        DO_ICALL                                                 
   11     3        NEW                                              $2      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   12     6        INIT_FCALL                                               'verify'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function verify:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/0RoeT
function name:  verify
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INSTANCEOF                                       ~1      !0, 'ArrayAccess'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->5
    7     4    >   ECHO                                                     'You+gave+me+a+malformed+object%21'
    9     5    > > RETURN                                                   null

End of function verify

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.52 ms | 1397 KiB | 16 Q