3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = 'Hello'; $replacement = 'hello'; (ctype_upper($needle[1])) ? ucfirst($replacement) : '' ; echo $replacement;
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/3N8OO
function name:  (null)
number of ops:  16
compiled vars:  !0 = $needle, !1 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Hello'
    3     1        ASSIGN                                                   !1, 'hello'
    5     2        INIT_FCALL                                               'ctype_upper'
          3        FETCH_DIM_R                                      ~4      !0, 1
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6      > JMPZ                                                     $5, ->12
          7    >   INIT_FCALL                                               'ucfirst'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        QM_ASSIGN                                        ~7      $6
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~7      ''
         13    >   FREE                                                     ~7
    7    14        ECHO                                                     !1
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.15 ms | 1386 KiB | 17 Q