3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private function testFunction($arr) { array_walk_recursive($arr, array('ControllerModuleStickyLabels','alt_json_encode_callback')); return mb_decode_numericentity(json_encode($arr), array (0x80, 0xffff, 0, 0xffff), 'UTF-8'); } private function alt_json_encode_callback (&$item, $key) { if (is_string($item)) $item = mb_encode_numericentity($item, array (0x80, 0xffff, 0, 0xffff), 'UTF-8'); } } $a = new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foDm9
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Test:
Function testfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foDm9
function name:  testFunction
number of ops:  15
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                                 
    7     5        INIT_FCALL                                               'mb_decode_numericentity'
          6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        SEND_VAL                                                 <array>
         11        SEND_VAL                                                 'UTF-8'
         12        DO_ICALL                                         $3      
         13      > RETURN                                                   $3
    8    14*     > RETURN                                                   null

End of function testfunction

Function alt_json_encode_callback:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/foDm9
function name:  alt_json_encode_callback
number of ops:  11
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        TYPE_CHECK                                   64          !0
          3      > JMPZ                                                     ~2, ->10
   12     4    >   INIT_FCALL                                               'mb_encode_numericentity'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 <array>
          7        SEND_VAL                                                 'UTF-8'
          8        DO_ICALL                                         $3      
          9        ASSIGN                                                   !0, $3
   13    10    > > RETURN                                                   null

End of function alt_json_encode_callback

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.84 ms | 1396 KiB | 21 Q