3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = 'Hello'; $replacement = 'hello'; echo ctype_upper($needle[0]); if (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 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/T7cau
function name:  (null)
number of ops:  19
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, ->15
   10    12    >   INIT_FCALL                                               'ucfirst'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   13    15    >   FETCH_DIM_R                                      ~9      !0, 0
         16        ECHO                                                     ~9
   14    17        ECHO                                                     !1
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.86 ms | 1399 KiB | 17 Q