3v4l.org

run code in 300+ PHP versions simultaneously
<?php $roots = array('/www/dev/sites/www.fred-4.com', '/www/dev/sites/www.fred-4.com-master'); foreach ($roots as $root) { $key = substr($root, strpos($root, '.com')); echo $root . " -> " . $key . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/WiN2t
function name:  (null)
number of ops:  19
compiled vars:  !0 = $roots, !1 = $root, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1      > FE_RESET_R                                       $4      !0, ->17
          2    > > FE_FETCH_R                                               $4, !1, ->17
    8     3    >   INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !1
          5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 '.com'
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
    9    12        CONCAT                                           ~8      !1, '+-%3E+'
         13        CONCAT                                           ~9      ~8, !2
         14        CONCAT                                           ~10     ~9, '%0A'
         15        ECHO                                                     ~10
    6    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $4
   11    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.53 ms | 1395 KiB | 17 Q