3v4l.org

run code in 300+ PHP versions simultaneously
<?php $course1 = "advanced web development"; $course2 = "mobile app development"; $course3 = "info systems with business intell"; // Pass by reference function fixCourseName(&$courseName) { $courseName = ucwords($courseName); } fixCourseName($course1); echo $course1; echo "\n"; // Prints a newline // Return the new value function fixCourseName_two($courseName) { return ucwords($courseName); } $course2 = fixCourseName_two($course2); echo $course2; echo "\n"; // Prints a newline // Using the ucwords() directly echo ucwords($course3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfMJB
function name:  (null)
number of ops:  19
compiled vars:  !0 = $course1, !1 = $course2, !2 = $course3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'advanced+web+development'
    4     1        ASSIGN                                                   !1, 'mobile+app+development'
    5     2        ASSIGN                                                   !2, 'info+systems+with+business+intell'
   11     3        INIT_FCALL                                               'fixcoursename'
          4        SEND_REF                                                 !0
          5        DO_FCALL                                      0          
   12     6        ECHO                                                     !0
   14     7        ECHO                                                     '%0A'
   20     8        INIT_FCALL                                               'fixcoursename_two'
          9        SEND_VAR                                                 !1
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !1, $7
   21    12        ECHO                                                     !1
   23    13        ECHO                                                     '%0A'
   26    14        INIT_FCALL                                               'ucwords'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $9      
         17        ECHO                                                     $9
         18      > RETURN                                                   1

Function fixcoursename:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfMJB
function name:  fixCourseName
number of ops:  6
compiled vars:  !0 = $courseName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'ucwords'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   10     5      > RETURN                                                   null

End of function fixcoursename

Function fixcoursename_two:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfMJB
function name:  fixCourseName_two
number of ops:  6
compiled vars:  !0 = $courseName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'ucwords'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   19     5*     > RETURN                                                   null

End of function fixcoursename_two

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.84 ms | 1013 KiB | 16 Q