3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1395 KiB | 17 Q