3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test(ArrayAccess $errors) { $errors[] = 'This is an error!'; } } $foo->test($errors = array()); var_dump($errors);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u76mr
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo, !1 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_METHOD_CALL                                         !0, 'test'
          1        ASSIGN                                           ~2      !1, <array>
          2        SEND_VAL_EX                                              ~2
          3        DO_FCALL                                      0          
   14     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u76mr
function name:  test
number of ops:  4
compiled vars:  !0 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'This+is+an+error%21'
    9     3      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.45 ms | 1394 KiB | 15 Q