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= Test::testFunction($array('1','1')); vardump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9gD4u
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'Test', 'testFunction'
          1        INIT_DYNAMIC_CALL                                        !1
          2        SEND_VAL_EX                                              '1'
          3        SEND_VAL_EX                                              '1'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0  $3      
          7        ASSIGN                                                   !0, $3
   18     8        INIT_FCALL_BY_NAME                                       'vardump'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Test:
Function testfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9gD4u
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/9gD4u
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:
156.32 ms | 1400 KiB | 21 Q