3v4l.org

run code in 300+ PHP versions simultaneously
<?php $h='my home is my castle'; $n='is'; $part = stristr($h,$n,true); $part2 = stristr($h,$n); if($pos=stripos($h,$n)) $part3=substr($h,0,$pos); echo "This is my: $part\n"; echo "That is my: $part2\n"; echo "Also, this: $part3\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/JfqEP
function name:  (null)
number of ops:  38
compiled vars:  !0 = $h, !1 = $n, !2 = $part, !3 = $part2, !4 = $pos, !5 = $part3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'my+home+is+my+castle'
    3     1        ASSIGN                                                   !1, 'is'
    4     2        INIT_FCALL                                               'stristr'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
    5     8        INIT_FCALL                                               'stristr'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    6    13        INIT_FCALL                                               'stripos'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $12     
         17        ASSIGN                                           ~13     !4, $12
         18      > JMPZ                                                     ~13, ->25
         19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 0
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !5, $14
    7    25    >   ROPE_INIT                                     3  ~17     'This+is+my%3A+'
         26        ROPE_ADD                                      1  ~17     ~17, !2
         27        ROPE_END                                      2  ~16     ~17, '%0A'
         28        ECHO                                                     ~16
    8    29        ROPE_INIT                                     3  ~20     'That+is+my%3A+'
         30        ROPE_ADD                                      1  ~20     ~20, !3
         31        ROPE_END                                      2  ~19     ~20, '%0A'
         32        ECHO                                                     ~19
    9    33        ROPE_INIT                                     3  ~23     'Also%2C+this%3A+'
         34        ROPE_ADD                                      1  ~23     ~23, !5
         35        ROPE_END                                      2  ~22     ~23, '%0A'
         36        ECHO                                                     ~22
   10    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.01 ms | 1396 KiB | 19 Q