3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = 'Hello'; $replacement = 'hello'; echo ctype_upper($needle[0]); (ctype_upper($needle[0])) ? '' : ucfirst($replacement) ; echo $needle[0]; echo $replacement;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sd229
function name:  (null)
number of ops:  23
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'
    6     2        INIT_FCALL                                               'ctype_upper'
          3        FETCH_DIM_R                                      ~4      !0, 0
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        ECHO                                                     $5
    9     7        INIT_FCALL                                               'ctype_upper'
          8        FETCH_DIM_R                                      ~6      !0, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11      > JMPZ                                                     $7, ->14
         12    >   QM_ASSIGN                                        ~8      ''
         13      > JMP                                                      ->18
         14    >   INIT_FCALL                                               'ucfirst'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $9      
         17        QM_ASSIGN                                        ~8      $9
         18    >   FREE                                                     ~8
   11    19        FETCH_DIM_R                                      ~10     !0, 0
         20        ECHO                                                     ~10
   12    21        ECHO                                                     !1
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.31 ms | 1399 KiB | 17 Q