3v4l.org

run code in 300+ PHP versions simultaneously
<?php $projectAndTarget = 'abcd-qa'; $s = strrpos($projectAndTarget, '-'); $project = substr($projectAndTarget, 0, $s); $target = substr($projectAndTarget, $s); echo $project . "\n" . $target;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9pWvk
function name:  (null)
number of ops:  21
compiled vars:  !0 = $projectAndTarget, !1 = $s, !2 = $project, !3 = $target
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'abcd-qa'
    3     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '-'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    5    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !3, $9
    6    17        CONCAT                                           ~11     !2, '%0A'
         18        CONCAT                                           ~12     ~11, !3
         19        ECHO                                                     ~12
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.82 ms | 1399 KiB | 17 Q