3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'world cup'; $arr = explode("\n",$test); $C= new stdClass(); $C->AUTO_HASHTAG = $arr; $myarr = array("world cup"); foreach($arrr as &$ht){ if(strpos($ht,'o')!==false) $myarr[] = str_replace('o','O',$ht); if(strpos($ht,'O')!==false) $myarr[] = str_replace('O','o',$ht); } var_export($myarr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 13, Position 2 = 41
Branch analysis from position: 13
2 jumps found. (Code = 126) Position 1 = 14, Position 2 = 41
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 40
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 40
Branch analysis from position: 27
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
filename:       /in/aY9ns
function name:  (null)
number of ops:  46
compiled vars:  !0 = $test, !1 = $arr, !2 = $C, !3 = $myarr, !4 = $arrr, !5 = $ht
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'world+cup'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
    5     6        NEW                                              $9      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
    6     9        ASSIGN_OBJ                                               !2, 'AUTO_HASHTAG'
         10        OP_DATA                                                  !1
    8    11        ASSIGN                                                   !3, <array>
   10    12      > FE_RESET_RW                                      $14     !4, ->41
         13    > > FE_FETCH_RW                                              $14, !5, ->41
   11    14    >   INIT_FCALL                                               'strpos'
         15        SEND_VAR                                                 !5
         16        SEND_VAL                                                 'o'
         17        DO_ICALL                                         $15     
         18        TYPE_CHECK                                  1018          $15
         19      > JMPZ                                                     ~16, ->27
   12    20    >   INIT_FCALL                                               'str_replace'
         21        SEND_VAL                                                 'o'
         22        SEND_VAL                                                 'O'
         23        SEND_VAR                                                 !5
         24        DO_ICALL                                         $18     
         25        ASSIGN_DIM                                               !3
         26        OP_DATA                                                  $18
   13    27    >   INIT_FCALL                                               'strpos'
         28        SEND_VAR                                                 !5
         29        SEND_VAL                                                 'O'
         30        DO_ICALL                                         $19     
         31        TYPE_CHECK                                  1018          $19
         32      > JMPZ                                                     ~20, ->40
   14    33    >   INIT_FCALL                                               'str_replace'
         34        SEND_VAL                                                 'O'
         35        SEND_VAL                                                 'o'
         36        SEND_VAR                                                 !5
         37        DO_ICALL                                         $22     
         38        ASSIGN_DIM                                               !3
         39        OP_DATA                                                  $22
   10    40    > > JMP                                                      ->13
         41    >   FE_FREE                                                  $14
   17    42        INIT_FCALL                                               'var_export'
         43        SEND_VAR                                                 !3
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.1 ms | 1400 KiB | 21 Q