3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Converter { public function runAllConversions(&$value) { $value = str_replace('x', 'MODIFIED', $value); } } $data = [ 'a' => 'x', 'b' => 'x', 'c' => ['x', 'a' => 'x', ['a' => 'x', 'x']], 'd' => ['x', 'b' => 'x', ['a' => 'x', 'x', ['x', 'c' => 'x', ['a' => 'x', 'x']]]] ]; array_walk_recursive($data, [new Converter(), 'runAllConversions']); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d4Log
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                       !0, <array>
   18     1        INIT_FCALL                                                   'array_walk_recursive'
          2        SEND_REF                                                     !0
          3        NEW                                                  $2      'Converter'
          4        DO_FCALL                                          0          
          5        INIT_ARRAY                                           ~4      $2
          6        ADD_ARRAY_ELEMENT                                    ~4      'runAllConversions'
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                                     
   20     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Class Converter:
Function runallconversions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d4Log
function name:  runAllConversions
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        FRAMELESS_ICALL_3                str_replace         ~1      'x', 'MODIFIED'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~1
    8     4      > RETURN                                                       null

End of function runallconversions

End of class Converter.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
178.36 ms | 2859 KiB | 15 Q