3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = array('test' => 'some ©', 'hello' => 'json' . pack("H*" ,'c32e') ); var_dump(json_encode($str)); $str = htmlentities( (string) $str['test'], ENT_QUOTES, 'utf-8', FALSE);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OhtmN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~1      'some+%C2%A9', 'test'
          1        INIT_FCALL                                               'pack'
          2        SEND_VAL                                                 'H%2A'
          3        SEND_VAL                                                 'c32e'
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      'json', $2
          6        ADD_ARRAY_ELEMENT                                ~1      ~3, 'hello'
          7        ASSIGN                                                   !0, ~1
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'htmlentities'
         15        FETCH_DIM_R                                      ~7      !0, 'test'
         16        CAST                                          6  ~8      ~7
         17        SEND_VAL                                                 ~8
         18        SEND_VAL                                                 3
         19        SEND_VAL                                                 'utf-8'
         20        SEND_VAL                                                 <false>
         21        DO_ICALL                                         $9      
         22        ASSIGN                                                   !0, $9
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.33 ms | 1395 KiB | 21 Q