3v4l.org

run code in 500+ PHP versions simultaneously
<?php function output($buffer) { global $object, $string, $int, $float, $array; $ret_val = array($string, $object->bar, $int, sprintf("%.2f", $float), $array[0]); return implode(" ", $ret_val); } ob_start('output'); $object = new stdClass(); $object->bar = "bar"; $string = "foo"; $int = 1; $float = 2.0; $array = array('array'); // $test = $object; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JtpQs
function name:  (null)
number of ops:  13
compiled vars:  !0 = $object, !1 = $string, !2 = $int, !3 = $float, !4 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'ob_start'
          1        SEND_VAL                                                     'output'
          2        DO_ICALL                                                     
   11     3        NEW                                                  $6      'stdClass'
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $6
   12     6        ASSIGN_OBJ                                                   !0, 'bar'
          7        OP_DATA                                                      'bar'
   14     8        ASSIGN                                                       !1, 'foo'
   15     9        ASSIGN                                                       !2, 1
   16    10        ASSIGN                                                       !3, 2
   17    11        ASSIGN                                                       !4, <array>
   20    12      > RETURN                                                       1

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JtpQs
function name:  output
number of ops:  21
compiled vars:  !0 = $buffer, !1 = $object, !2 = $string, !3 = $int, !4 = $float, !5 = $array, !6 = $ret_val
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        BIND_GLOBAL                                                  !1, 'object'
          2        BIND_GLOBAL                                                  !2, 'string'
          3        BIND_GLOBAL                                                  !3, 'int'
          4        BIND_GLOBAL                                                  !4, 'float'
          5        BIND_GLOBAL                                                  !5, 'array'
    6     6        INIT_ARRAY                                           ~7      !2
          7        FETCH_OBJ_R                                          ~8      !1, 'bar'
          8        ADD_ARRAY_ELEMENT                                    ~7      ~8
          9        ADD_ARRAY_ELEMENT                                    ~7      !3
         10        INIT_FCALL                                                   'sprintf'
         11        SEND_VAL                                                     '%25.2f'
         12        SEND_VAR                                                     !4
         13        DO_ICALL                                             $9      
         14        ADD_ARRAY_ELEMENT                                    ~7      $9
         15        FETCH_DIM_R                                          ~10     !5, 0
         16        ADD_ARRAY_ELEMENT                                    ~7      ~10
         17        ASSIGN                                                       !6, ~7
    7    18        FRAMELESS_ICALL_2                implode             ~12     '+', !6
         19      > RETURN                                                       ~12
    8    20*     > RETURN                                                       null

End of function output

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
191.93 ms | 2858 KiB | 17 Q