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)); var_dump($this->page); echo "\n 1: "; var_dump(mb_detect_encoding($this->page)); var_dump(strlen($this->page)); $temp=htmlentities($this->page, ENT_IGNORE, 'UTF-8'); echo "\n 2: "; var_dump(mb_detect_encoding($temp)); var_dump(strlen($this->page)); echo "\n 3: "; var_dump(mb_detect_encoding($this->page)); var_dump($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/6FLra
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'text'
          4        DO_FCALL                                      0          
   24     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/6FLra
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/6FLra
function name:  text
number of ops:  57
compiled vars:  !0 = $temp
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                                      ~1      'page'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~4      'page'
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
   10    12        ECHO                                                     '%0A+1%3A+'
   11    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'mb_detect_encoding'
         15        FETCH_OBJ_R                                      ~6      'page'
         16        SEND_VAL                                                 ~6
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
   12    20        INIT_FCALL                                               'var_dump'
         21        FETCH_OBJ_R                                      ~9      'page'
         22        STRLEN                                           ~10     ~9
         23        SEND_VAL                                                 ~10
         24        DO_ICALL                                                 
   13    25        INIT_FCALL                                               'htmlentities'
         26        FETCH_OBJ_R                                      ~12     'page'
         27        SEND_VAL                                                 ~12
         28        SEND_VAL                                                 4
         29        SEND_VAL                                                 'UTF-8'
         30        DO_ICALL                                         $13     
         31        ASSIGN                                                   !0, $13
   14    32        ECHO                                                     '%0A+2%3A+'
   15    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'mb_detect_encoding'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                         $15     
         37        SEND_VAR                                                 $15
         38        DO_ICALL                                                 
   16    39        INIT_FCALL                                               'var_dump'
         40        FETCH_OBJ_R                                      ~17     'page'
         41        STRLEN                                           ~18     ~17
         42        SEND_VAL                                                 ~18
         43        DO_ICALL                                                 
   17    44        ECHO                                                     '%0A+3%3A+'
   18    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'mb_detect_encoding'
         47        FETCH_OBJ_R                                      ~20     'page'
         48        SEND_VAL                                                 ~20
         49        DO_ICALL                                         $21     
         50        SEND_VAR                                                 $21
         51        DO_ICALL                                                 
   19    52        INIT_FCALL                                               'var_dump'
         53        FETCH_OBJ_R                                      ~23     'page'
         54        SEND_VAL                                                 ~23
         55        DO_ICALL                                                 
   20    56      > RETURN                                                   null

End of function text

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.59 ms | 1400 KiB | 19 Q