3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = "gboli insurance plc" ; echo breakWordThenTitle($val) , "\n" ; echo title($val) , "\n" ; function title($obj = null) { return ucwords(strval($obj)); } function breakWordThenTitle($obj = null) { $data=explode(" ",$obj); $rData=""; foreach($data as $d){ $rData.=ucwords($d)." "; } return $rData; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LaN1a
function name:  (null)
number of ops:  12
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'gboli+insurance+plc'
    6     1        INIT_FCALL_BY_NAME                                       'breakWordThenTitle'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5        ECHO                                                     '%0A'
    7     6        INIT_FCALL_BY_NAME                                       'title'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $3      
          9        ECHO                                                     $3
         10        ECHO                                                     '%0A'
   24    11      > RETURN                                                   1

Function title:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LaN1a
function name:  title
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      null
   11     1        INIT_FCALL                                               'ucwords'
          2        CAST                                          6  ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
   12     6*     > RETURN                                                   null

End of function title

Function breakwordthentitle:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/LaN1a
function name:  breakWordThenTitle
number of ops:  18
compiled vars:  !0 = $obj, !1 = $data, !2 = $rData, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV_INIT                                        !0      null
   16     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   17     6        ASSIGN                                                   !2, ''
   19     7      > FE_RESET_R                                       $7      !1, ->15
          8    > > FE_FETCH_R                                               $7, !3, ->15
   20     9    >   INIT_FCALL                                               'ucwords'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $8      
         12        CONCAT                                           ~9      $8, '+'
         13        ASSIGN_OP                                     8          !2, ~9
   19    14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $7
   23    16      > RETURN                                                   !2
   24    17*     > RETURN                                                   null

End of function breakwordthentitle

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.18 ms | 1400 KiB | 17 Q