3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = 'y HeloWerld'; $werds = preg_split('/(?=[A-Z])/',$sentence); var_dump(preg_replace('/\s+/','',ucwords(implode(' ',$werds))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RBHaD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $sentence, !1 = $werds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'y++HeloWerld'
    3     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%28%3F%3D%5BA-Z%5D%29%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5Cs%2B%2F'
          9        SEND_VAL                                                 ''
         10        INIT_FCALL                                               'ucwords'
         11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '+'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                         $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.14 ms | 940 KiB | 24 Q