3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sessionArray = array( 'Romero' => 2, 'Ronaldinho' => 4, 'ronaldo' =>8, 'messi' => 20 ); $id = array(); $name = array(); foreach($_SESSION['list'] as $key => $value) { if(strpos(strtolower($key), strtolower($str)) !== FALSE) { $id[] = $value; $name[] = $key; } } print_r($id); echo "<br/>"; print_r($name);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 24
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/K66sE
function name:  (null)
number of ops:  34
compiled vars:  !0 = $sessionArray, !1 = $id, !2 = $name, !3 = $value, !4 = $key, !5 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        ASSIGN                                                   !2, <array>
   13     3        FETCH_R                      global              ~9      '_SESSION'
          4        FETCH_DIM_R                                      ~10     ~9, 'list'
          5      > FE_RESET_R                                       $11     ~10, ->25
          6    > > FE_FETCH_R                                       ~12     $11, !3, ->25
          7    >   ASSIGN                                                   !4, ~12
   15     8        INIT_FCALL                                               'strpos'
          9        INIT_FCALL                                               'strtolower'
         10        SEND_VAR                                                 !4
         11        DO_ICALL                                         $14     
         12        SEND_VAR                                                 $14
         13        INIT_FCALL                                               'strtolower'
         14        SEND_VAR                                                 !5
         15        DO_ICALL                                         $15     
         16        SEND_VAR                                                 $15
         17        DO_ICALL                                         $16     
         18        TYPE_CHECK                                  1018          $16
         19      > JMPZ                                                     ~17, ->24
   17    20    >   ASSIGN_DIM                                               !1
         21        OP_DATA                                                  !3
   18    22        ASSIGN_DIM                                               !2
         23        OP_DATA                                                  !4
   13    24    > > JMP                                                      ->6
         25    >   FE_FREE                                                  $11
   22    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                                 
   23    29        ECHO                                                     '%3Cbr%2F%3E'
   24    30        INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162 ms | 1401 KiB | 19 Q