3v4l.org

run code in 300+ 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"; $object->o=$object; $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/SOOLf
function name:  (null)
number of ops:  15
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'
   13     8        ASSIGN_OBJ                                               !0, 'o'
          9        OP_DATA                                                  !0
   15    10        ASSIGN                                                   !1, 'foo'
   16    11        ASSIGN                                                   !2, 1
   17    12        ASSIGN                                                   !3, 2
   18    13        ASSIGN                                                   !4, <array>
   21    14      > RETURN                                                   1

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SOOLf
function name:  output
number of ops:  24
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        INIT_FCALL                                               'implode'
         19        SEND_VAL                                                 '+'
         20        SEND_VAR                                                 !6
         21        DO_ICALL                                         $12     
         22      > RETURN                                                   $12
    8    23*     > RETURN                                                   null

End of function output

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.51 ms | 1400 KiB | 19 Q