3v4l.org

run code in 300+ PHP versions simultaneously
<?php function assignValuesFromText( $sIn, $dVat = null ){ $aRet = array(); $aPieces = explode( '@@', $sIn ); while ( list( $sKey, $sVal ) = each( $aPieces ) ) { if ( $sVal ) { $aName = explode( '__', $sVal ); if ( isset( $aName[0] ) && isset( $aName[1] ) ) { $aRet[] = $this->_fillExplodeArray( $aName, $dVat ); } } } return $aRet; } $string = "Schwarz__@@Weiß__@@Schön!P!10__@@Cool!P!50%__@@"; echo print_r(assignValuesFromText($string),true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WUDaZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'Schwarz__%40%40Wei%C3%9F__%40%40Sch%C3%B6n%21P%2110__%40%40Cool%21P%2150%25__%40%40'
   18     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'assignvaluesfromtext'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $3      
          8        ECHO                                                     $3
          9      > RETURN                                                   1

Function assignvaluesfromtext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 9
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 9
Branch analysis from position: 35
Branch analysis from position: 9
Branch analysis from position: 27
Branch analysis from position: 19
Branch analysis from position: 27
filename:       /in/WUDaZ
function name:  assignValuesFromText
number of ops:  37
compiled vars:  !0 = $sIn, !1 = $dVat, !2 = $aRet, !3 = $aPieces, !4 = $sVal, !5 = $aName, !6 = $sKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    3     2        ASSIGN                                                   !2, <array>
    4     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%40%40'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
    5     8      > JMP                                                      ->27
    6     9    > > JMPZ                                                     !4, ->27
    7    10    >   INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '__'
         12        SEND_VAR                                                 !4
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !5, $10
    8    15        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !5, 0
         16      > JMPZ_EX                                          ~12     ~12, ->19
         17    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~13     !5, 1
         18        BOOL                                             ~12     ~13
         19    > > JMPZ                                                     ~12, ->27
    9    20    >   FETCH_THIS                                       $15     
         21        INIT_METHOD_CALL                                         $15, '_fillExplodeArray'
         22        SEND_VAR_EX                                              !5
         23        SEND_VAR_EX                                              !1
         24        DO_FCALL                                      0  $16     
         25        ASSIGN_DIM                                               !2
         26        OP_DATA                                                  $16
    5    27    >   INIT_FCALL_BY_NAME                                       'each'
         28        SEND_VAR_EX                                              !3
         29        DO_FCALL                                      0  $17     
         30        FETCH_LIST_R                                     $18     $17, 0
         31        ASSIGN                                                   !6, $18
         32        FETCH_LIST_R                                     $20     $17, 1
         33        ASSIGN                                                   !4, $20
         34      > JMPNZ                                                    $17, ->9
   13    35    > > RETURN                                                   !2
   14    36*     > RETURN                                                   null

End of function assignvaluesfromtext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.26 ms | 1403 KiB | 18 Q