3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "tacos ares so good {tag} don't you think {tag} or do you not think?"; function _return_between($tag,$subject) { $split = explode($tag,$subject,3); return isset($split[1])?$split[1]:false; } echo _return_between('{tag}',$string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2v3Op
function name:  (null)
number of ops:  7
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'tacos+ares+so+good+%7Btag%7D++don%27t+you+think+%7Btag%7D++or+do+you+not+think%3F'
    7     1        INIT_FCALL                                               '_return_between'
          2        SEND_VAL                                                 '%7Btag%7D'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

Function _return_between:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2v3Op
function name:  _return_between
number of ops:  16
compiled vars:  !0 = $tag, !1 = $subject, !2 = $split
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 3
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !2, $3
    5     8        ISSET_ISEMPTY_DIM_OBJ                         0          !2, 1
          9      > JMPZ                                                     ~5, ->13
         10    >   FETCH_DIM_R                                      ~6      !2, 1
         11        QM_ASSIGN                                        ~7      ~6
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~7      <false>
         14    > > RETURN                                                   ~7
    6    15*     > RETURN                                                   null

End of function _return_between

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.49 ms | 1398 KiB | 16 Q