3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.64 ms | 1395 KiB | 17 Q