3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test(ArrayAccess $errors) { $errors[] = 'This is an error!'; } } $foo = new Foo; $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/s5msJ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        INIT_METHOD_CALL                                         !0, 'test'
          4        ASSIGN                                           ~5      !1, <array>
          5        SEND_VAL_EX                                              ~5
          6        DO_FCALL                                      0          
   15     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s5msJ
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:
165.27 ms | 1395 KiB | 15 Q