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); $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 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IqHPO
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $lol, !2 = $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  $4      
          4        ASSIGN                                                   !1, $4
   14     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAL                                                 '%22%5Cu093F%22'
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   22     9        CONCAT                                           ~8      !2, '---'
         10        FETCH_DIM_R                                      ~9      !1, 1
         11        CONCAT                                           ~10     ~8, ~9
         12        ECHO                                                     ~10
   23    13        FETCH_DIM_R                                      ~11     !1, 1
         14        IS_EQUAL                                                 !2, ~11
         15      > JMPZ                                                     ~12, ->18
   24    16    >   ECHO                                                     'Game'
         17      > JMP                                                      ->19
   27    18    >   ECHO                                                     'No+game'
   28    19    >   INIT_FCALL                                               'overall'
         20        DO_FCALL                                      0          
   30    21      > 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/IqHPO
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 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
Branch analysis from position: 3
filename:       /in/IqHPO
function name:  overall
number of ops:  15
compiled vars:  !0 = $hindi, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->11
   19     3    >   INIT_FCALL                                               'json_decode'
          4        FETCH_DIM_R                                      ~4      !0, !1
          5        CONCAT                                           ~5      '%22', ~4
          6        CONCAT                                           ~6      ~5, '%22'
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        ECHO                                                     $7
   18    10        PRE_INC                                                  !1
         11    >   COUNT                                            ~9      !0
         12        IS_SMALLER                                               !1, ~9
         13      > JMPNZ                                                    ~10, ->3
   21    14    > > RETURN                                                   null

End of function overall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.93 ms | 1407 KiB | 21 Q