3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'code' => 200, 'results' => [ 'id' => 1 ], 'a' => [ [ 'b' => [ 4, null, false ] ] ] ]; array_walk_recursive( $array, function(&$v) { if (is_numeric($v)) { $v = strval($v); } } ); echo json_encode($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9XYFd
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   19     1        INIT_FCALL                                                   'array_walk_recursive'
   20     2        SEND_REF                                                     !0
   21     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   25     4        SEND_VAL                                                     ~2
   19     5        DO_ICALL                                                     
   27     6        INIT_FCALL                                                   'json_encode'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $4      
          9        ECHO                                                         $4
         10      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/9XYFd
function name:  {closure:/in/9XYFd:21}
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   RECV                                                 !0      
   22     1        FRAMELESS_ICALL_1                is_numeric          ~1      !0
          2      > JMPZ                                                         ~1, ->5
   23     3    >   CAST                                              6  ~2      !0
          4        ASSIGN                                                       !0, ~2
   25     5    > > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.75 ms | 2009 KiB | 15 Q