3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo substr("Altis Avenida201306031237", 0 , (strrpos("Altis Avenida201306031237","-") == -1 ? strlen("Altis Avenida201306031237") : strrpos("Altis Avenida201306031237","-")) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKOnT
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'substr'
          1        SEND_VAL                                                 'Altis+Avenida201306031237'
          2        SEND_VAL                                                 0
          3        INIT_FCALL                                               'strrpos'
          4        SEND_VAL                                                 'Altis+Avenida201306031237'
          5        SEND_VAL                                                 '-'
          6        DO_ICALL                                         $0      
          7        IS_EQUAL                                                 $0, -1
          8      > JMPZ                                                     ~1, ->11
          9    >   QM_ASSIGN                                        ~2      25
         10      > JMP                                                      ->16
         11    >   INIT_FCALL                                               'strrpos'
         12        SEND_VAL                                                 'Altis+Avenida201306031237'
         13        SEND_VAL                                                 '-'
         14        DO_ICALL                                         $3      
         15        QM_ASSIGN                                        ~2      $3
         16    >   SEND_VAL                                                 ~2
         17        DO_ICALL                                         $4      
         18        ECHO                                                     $4
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.38 ms | 1395 KiB | 17 Q