3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __toString() { return "bar"; } } $params = array(); $params['a'] = 'b'; $params['foo'] = (string) 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/eMb8J
function name:  (null)
number of ops:  17
compiled vars:  !0 = $params, !1 = $query
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  11     0  E >   QM_ASSIGN                                                !0
  12     1        ASSIGN_ADD                                    0          !0, 'a'
         2        OP_DATA                                                  'b'
  13     3        NEW                                              $5      :27
         4        DO_FCALL                                      0          
         5        MAKE_REF                                         ~7      $5
         6        ASSIGN_ADD                                    0          !0, 'foo'
         7        OP_DATA                                                  ~7
  15     8        INIT_FCALL                                               'http_build_query'
         9        SEND_VAR                                                 !0
        10        DO_ICALL                                         $8      
        11        QM_ASSIGN                                                !1
  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/eMb8J
function name:  __toString
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E > > RETURN                                                   'bar'
   8     1*     > RETURN                                                   null

End of function __tostring

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
26.01 ms | 417 KiB | 15 Q