3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nomChamp = 'p.id_projet'; $positionPrefixe = strpos($nomChamp, '.'); if($positionPrefixe !== false) { $prefixe = substr($nomChamp, 0, $positionPrefixe - 1); $nomChamp = str_replace($prefixe, '', $nomChamp); } print_r($prefixe); echo "*****************\n"; print_r($nomChamp); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/mEeTS
function name:  (null)
number of ops:  29
compiled vars:  !0 = $nomChamp, !1 = $positionPrefixe, !2 = $prefixe
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'p.id_projet'
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        TYPE_CHECK                                  1018          !1
          7      > JMPZ                                                     ~6, ->21
    5     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 0
         11        SUB                                              ~7      !1, 1
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
    6    15        INIT_FCALL                                               'str_replace'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 ''
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !0, $10
    8    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
    9    24        ECHO                                                     '%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%0A'
   10    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
   11    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.17 ms | 1395 KiB | 21 Q