3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '"Harry":"12345","Biswas":"789456","garry":"56894"'; $passwords = array(); foreach( str_getcsv( $str) as $entry) { list( $name, $pw) = explode( ':', $entry); $passwords[$name] = $pw; } echo $passwords["Harry"]; // 12345
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/ItlG8
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $passwords, !2 = $entry, !3 = $name, !4 = $pw
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%22Harry%22%3A%2212345%22%2C%22Biswas%22%3A%22789456%22%2C%22garry%22%3A%2256894%22'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'str_getcsv'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5      > FE_RESET_R                                       $8      $7, ->19
          6    > > FE_FETCH_R                                               $8, !2, ->19
    6     7    >   INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%3A'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $9      
         11        FETCH_LIST_R                                     $10     $9, 0
         12        ASSIGN                                                   !3, $10
         13        FETCH_LIST_R                                     $12     $9, 1
         14        ASSIGN                                                   !4, $12
         15        FREE                                                     $9
    7    16        ASSIGN_DIM                                               !1, !3
         17        OP_DATA                                                  !4
    5    18      > JMP                                                      ->6
         19    >   FE_FREE                                                  $8
   11    20        FETCH_DIM_R                                      ~15     !1, 'Harry'
         21        ECHO                                                     ~15
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.54 ms | 1395 KiB | 17 Q