3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->foo = new stdClass(); $a->bar = $a; $a->baz = function(){return 1;}; $res = print_r($a, true); echo $res, "\n"; echo str_replace(["\r\n", "\r", "\n"], ["\n", "", '\n'], $res), "\n"; echo preg_replace('/\s+/', ' ', $res), "\n"; echo strlen($res), "\n"; echo strlen(base64_encode($res)), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQQLE
function name:  (null)
number of ops:  43
compiled vars:  !0 = $a, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'foo'
          6        OP_DATA                                                  $6
    6     7        ASSIGN_OBJ                                               !0, 'bar'
          8        OP_DATA                                                  !0
    7     9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcQQLE%3A7%240'
         10        ASSIGN_OBJ                                               !0, 'baz'
         11        OP_DATA                                                  ~10
    9    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !1, $11
   10    17        ECHO                                                     !1
         18        ECHO                                                     '%0A'
   11    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAL                                                 <array>
         21        SEND_VAL                                                 <array>
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $13     
         24        ECHO                                                     $13
         25        ECHO                                                     '%0A'
   12    26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         28        SEND_VAL                                                 '+'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $14     
         31        ECHO                                                     $14
         32        ECHO                                                     '%0A'
   14    33        STRLEN                                           ~15     !1
         34        ECHO                                                     ~15
         35        ECHO                                                     '%0A'
   15    36        INIT_FCALL                                               'base64_encode'
         37        SEND_VAR                                                 !1
         38        DO_ICALL                                         $16     
         39        STRLEN                                           ~17     $16
         40        ECHO                                                     ~17
         41        ECHO                                                     '%0A'
         42      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcQQLE%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQQLE
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   1
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcQQLE%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.12 ms | 1400 KiB | 21 Q