3v4l.org

run code in 300+ PHP versions simultaneously
<?php function returnFirst($rsrnum) { $char = $rsrnum[0]; return ctype_alpha($char) ? strtolower($char) : '%23'; } echo returnFirst('ADSASTEADS')."\n"; echo returnFirst(2342342)."\n"; echo returnFirst('3SASDAsd')."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVXve
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'returnfirst'
          1        SEND_VAL                                                 'ADSASTEADS'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      $0, '%0A'
          4        ECHO                                                     ~1
    9     5        INIT_FCALL                                               'returnfirst'
          6        SEND_VAL                                                 2342342
          7        DO_FCALL                                      0  $2      
          8        CONCAT                                           ~3      $2, '%0A'
          9        ECHO                                                     ~3
   10    10        INIT_FCALL                                               'returnfirst'
         11        SEND_VAL                                                 '3SASDAsd'
         12        DO_FCALL                                      0  $4      
         13        CONCAT                                           ~5      $4, '%0A'
         14        ECHO                                                     ~5
         15      > RETURN                                                   1

Function returnfirst:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVXve
function name:  returnFirst
number of ops:  15
compiled vars:  !0 = $rsrnum, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_DIM_R                                      ~2      !0, 0
          2        ASSIGN                                                   !1, ~2
    5     3        INIT_FCALL                                               'ctype_alpha'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->12
          7    >   INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        QM_ASSIGN                                        ~6      $5
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~6      '%2523'
         13    > > RETURN                                                   ~6
    6    14*     > RETURN                                                   null

End of function returnfirst

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.92 ms | 1399 KiB | 20 Q