3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $resource = fopen('php://stdout', 'w'); // $callable = function() {}; $array = array(1,2,3); class C { public function M(resource $r) { var_dump($r); } } $c = new C(); var_dump($c->M($resource));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fuq89
function name:  (null)
number of ops:  19
compiled vars:  !0 = $resource, !1 = $array, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'fopen'
          4        SEND_VAL                                                 'php%3A%2F%2Fstdout'
          5        SEND_VAL                                                 'w'
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    5     8        ASSIGN                                                   !1, <array>
   16     9        NEW                                              $7      'C'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $7
   17    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !2, 'M'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $10     
         16        SEND_VAR                                                 $10
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class C:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fuq89
function name:  M
number of ops:  5
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function m

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.13 ms | 1395 KiB | 19 Q