3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myarr = array("world cup"); foreach($myarr as &$v){ if(strpos($v,'o')!==false) $myarr[] = str_replace('o','O',$v); } var_export($myarr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/1XsRQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $myarr, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $3      !0, ->17
          2    > > FE_FETCH_RW                                              $3, !1, ->17
    6     3    >   INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'o'
          6        DO_ICALL                                         $4      
          7        TYPE_CHECK                                  1018          $4
          8      > JMPZ                                                     ~5, ->16
    7     9    >   INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 'o'
         11        SEND_VAL                                                 'O'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        ASSIGN_DIM                                               !0
         15        OP_DATA                                                  $7
    5    16    > > JMP                                                      ->2
         17    >   FE_FREE                                                  $3
   10    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.02 ms | 1400 KiB | 19 Q