3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding("UTF-8"); $s="ó12345678\r\n1234\n;"; //$s=utf8_encode("ó12345678\r\n1234\n;") // "ó12345678rn1234n;" // 012345678901234567890 print_r(mb_detect_encoding($s)."\n"); print_r(mb_strlen($s)."\n"); print_r(mb_strpos($s,';')."\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9EG2D
function name:  (null)
number of ops:  27
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'mb_internal_encoding'
          1        SEND_VAL                                                 'UTF-8'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, '%C3%B312345678%0D%0A1234%0A%3B'
    8     4        INIT_FCALL                                               'print_r'
          5        INIT_FCALL                                               'mb_detect_encoding'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      $3, '%0A'
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'print_r'
         12        INIT_FCALL                                               'mb_strlen'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        CONCAT                                           ~7      $6, '%0A'
         16        SEND_VAL                                                 ~7
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'print_r'
         19        INIT_FCALL                                               'mb_strpos'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 '%3B'
         22        DO_ICALL                                         $9      
         23        CONCAT                                           ~10     $9, '%0A'
         24        SEND_VAL                                                 ~10
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.44 ms | 1395 KiB | 23 Q