3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function __construct(){ $this->page="Test<br/>Test hého"; } function text(){ echo "\n START\n"; var_dump(mb_detect_encoding($this->page)); echo "\n 1: "; var_dump(mb_detect_encoding($this->page)); echo "\n 2: "; var_dump(mb_detect_encoding(htmlentities($this->page, ENT_IGNORE, 'UTF-8'))); $this->page = html_entity_decode($this->page); echo "\n 3: "; var_dump(mb_detect_encoding($this->page)); } } $a=new Test(); $a->text(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmkgI
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'text'
          4        DO_FCALL                                      0          
   20     5      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmkgI
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_OBJ                                               'page'
          1        OP_DATA                                                  'Test%3Cbr%2F%3ETest+h%C3%A9ho'
    5     2      > RETURN                                                   null

End of function __construct

Function text:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmkgI
function name:  text
number of ops:  44
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '%0A+START%0A'
    8     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'mb_detect_encoding'
          3        FETCH_OBJ_R                                      ~0      'page'
          4        SEND_VAL                                                 ~0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
    9     8        ECHO                                                     '%0A+1%3A+'
   10     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'mb_detect_encoding'
         11        FETCH_OBJ_R                                      ~3      'page'
         12        SEND_VAL                                                 ~3
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                                 
   11    16        ECHO                                                     '%0A+2%3A+'
   12    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'mb_detect_encoding'
         19        INIT_FCALL                                               'htmlentities'
         20        FETCH_OBJ_R                                      ~6      'page'
         21        SEND_VAL                                                 ~6
         22        SEND_VAL                                                 4
         23        SEND_VAL                                                 'UTF-8'
         24        DO_ICALL                                         $7      
         25        SEND_VAR                                                 $7
         26        DO_ICALL                                         $8      
         27        SEND_VAR                                                 $8
         28        DO_ICALL                                                 
   13    29        INIT_FCALL                                               'html_entity_decode'
         30        FETCH_OBJ_R                                      ~11     'page'
         31        SEND_VAL                                                 ~11
         32        DO_ICALL                                         $12     
         33        ASSIGN_OBJ                                               'page'
         34        OP_DATA                                                  $12
   14    35        ECHO                                                     '%0A+3%3A+'
   15    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'mb_detect_encoding'
         38        FETCH_OBJ_R                                      ~13     'page'
         39        SEND_VAL                                                 ~13
         40        DO_ICALL                                         $14     
         41        SEND_VAR                                                 $14
         42        DO_ICALL                                                 
   16    43      > RETURN                                                   null

End of function text

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.52 ms | 1400 KiB | 21 Q