3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __toString() { return "bar"; } } $params = array(); $params['a'] = 'b'; $params['foo'] = new foo(); $query = http_build_query($params); var_dump($params, $query);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/16dMa
function name:  (null)
number of ops:  17
compiled vars:  !0 = $params, !1 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo'
   11     1        ASSIGN                                                   !0, <array>
   12     2        ASSIGN_DIM                                               !0, 'a'
          3        OP_DATA                                                  'b'
   13     4        NEW                                              $5      'foo'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !0, 'foo'
          7        OP_DATA                                                  $5
   15     8        INIT_FCALL                                               'http_build_query'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
   17    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class foo:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/16dMa
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'bar'
    8     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
218.43 ms | 1395 KiB | 17 Q