3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRectangleData($width, $height) { $circumference = calculateCircumference($width, $height); $area = calculateArea($width, $height); return "Omkretsen är $omkrets och aren är $area"; } function calculateCircumference($width, $height) { return ($width + $height) * 2; } function calculateArea($width, $height) { return $width * $height; } echo getRectangleData(10, 5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LMOl0
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'getrectangledata'
          1        SEND_VAL                                                 10
          2        SEND_VAL                                                 5
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function getrectangledata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LMOl0
function name:  getRectangleData
number of ops:  18
compiled vars:  !0 = $width, !1 = $height, !2 = $circumference, !3 = $area, !4 = $omkrets
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL_BY_NAME                                       'calculateCircumference'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
    5     7        INIT_FCALL_BY_NAME                                       'calculateArea'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !3, $7
    7    12        ROPE_INIT                                     4  ~10     'Omkretsen+%C3%A4r+'
         13        ROPE_ADD                                      1  ~10     ~10, !4
         14        ROPE_ADD                                      2  ~10     ~10, '+och+aren+%C3%A4r+'
         15        ROPE_END                                      3  ~9      ~10, !3
         16      > RETURN                                                   ~9
    8    17*     > RETURN                                                   null

End of function getrectangledata

Function calculatecircumference:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LMOl0
function name:  calculateCircumference
number of ops:  6
compiled vars:  !0 = $width, !1 = $height
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ADD                                              ~2      !0, !1
          3        MUL                                              ~3      ~2, 2
          4      > RETURN                                                   ~3
   12     5*     > RETURN                                                   null

End of function calculatecircumference

Function calculatearea:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LMOl0
function name:  calculateArea
number of ops:  5
compiled vars:  !0 = $width, !1 = $height
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        MUL                                              ~2      !0, !1
          3      > RETURN                                                   ~2
   16     4*     > RETURN                                                   null

End of function calculatearea

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.07 ms | 1403 KiB | 14 Q