3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mbStringToArray ($string) { $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_substr($string,0,1,"UTF-8"); $string = mb_substr($string,1,$strlen,"UTF-8"); $strlen = mb_strlen($string); } return $array; } $a = "बिक्रम"; $lol = mbStringToArray($a); $yo = "\u093F"; echo json_decode($yo); $test = json_decode('"\u093F"'); function overall (){ $hindi = array("\u093E","\u093F","\u0945","\u0946","\u0947","\u0948","\u0949","\u094A","\u094B","\u094C","\u094D"); for($i = 0; $i<count($hindi); $i++){ echo json_decode('$hindi[$i]'); } } echo $test."---".$lol[1]; if($test == $lol[1]){ echo "Game"; } else echo "No game"; //overall(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h6jXh
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $lol, !2 = $yo, !3 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, '%E0%A4%AC%E0%A4%BF%E0%A4%95%E0%A5%8D%E0%A4%B0%E0%A4%AE'
   12     1        INIT_FCALL                                               'mbstringtoarray'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !1, $5
   13     5        ASSIGN                                                   !2, '%5Cu093F'
   14     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $8      
          9        ECHO                                                     $8
   15    10        INIT_FCALL                                               'json_decode'
         11        SEND_VAL                                                 '%22%5Cu093F%22'
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
   23    14        CONCAT                                           ~11     !3, '---'
         15        FETCH_DIM_R                                      ~12     !1, 1
         16        CONCAT                                           ~13     ~11, ~12
         17        ECHO                                                     ~13
   24    18        FETCH_DIM_R                                      ~14     !1, 1
         19        IS_EQUAL                                                 !3, ~14
         20      > JMPZ                                                     ~15, ->23
   25    21    >   ECHO                                                     'Game'
         22      > JMP                                                      ->24
   28    23    >   ECHO                                                     'No+game'
   31    24    > > RETURN                                                   1

Function mbstringtoarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 6
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 6
Branch analysis from position: 26
Branch analysis from position: 6
filename:       /in/h6jXh
function name:  mbStringToArray
number of ops:  28
compiled vars:  !0 = $string, !1 = $strlen, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'mb_strlen'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    4     5      > JMP                                                      ->25
    5     6    >   INIT_FCALL                                               'mb_substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 'UTF-8'
         11        DO_ICALL                                         $6      
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  $6
    6    14        INIT_FCALL                                               'mb_substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 1
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 'UTF-8'
         19        DO_ICALL                                         $7      
         20        ASSIGN                                                   !0, $7
    7    21        INIT_FCALL                                               'mb_strlen'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $9      
         24        ASSIGN                                                   !1, $9
    4    25    > > JMPNZ                                                    !1, ->6
    9    26    > > RETURN                                                   !2
   10    27*     > RETURN                                                   null

End of function mbstringtoarray

Function overall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/h6jXh
function name:  overall
number of ops:  12
compiled vars:  !0 = $hindi, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   19     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->8
   20     3    >   INIT_FCALL                                               'json_decode'
          4        SEND_VAL                                                 '%24hindi%5B%24i%5D'
          5        DO_ICALL                                         $4      
          6        ECHO                                                     $4
   19     7        PRE_INC                                                  !1
          8    >   COUNT                                            ~6      !0
          9        IS_SMALLER                                               !1, ~6
         10      > JMPNZ                                                    ~7, ->3
   22    11    > > RETURN                                                   null

End of function overall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.41 ms | 1403 KiB | 20 Q