3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $song_ratings = [ 'Bullet with Butterfly Wings' => 5, '1979' => 4, 'Tonight, Tonight' => 4, ]; function display_rating(int $rating, string $title) { return "$title: $rating"; } foreach ($song_ratings as $title => $rating) { echo display_rating($rating, $title) . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 11
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/R4rnD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $song_ratings, !1 = $rating, !2 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   16     1      > FE_RESET_R                                       $4      !0, ->11
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->11
          3    >   ASSIGN                                                   !2, ~5
   17     4        INIT_FCALL                                               'display_rating'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_FCALL                                      0  $7      
          8        CONCAT                                           ~8      $7, '%0A'
          9        ECHO                                                     ~8
   16    10      > JMP                                                      ->2
         11    >   FE_FREE                                                  $4
   18    12      > RETURN                                                   1

Function display_rating:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R4rnD
function name:  display_rating
number of ops:  7
compiled vars:  !0 = $rating, !1 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        ROPE_INIT                                     3  ~3      !1
          3        ROPE_ADD                                      1  ~3      ~3, '%3A+'
          4        ROPE_END                                      2  ~2      ~3, !0
          5      > RETURN                                                   ~2
   14     6*     > RETURN                                                   null

End of function display_rating

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.25 ms | 1000 KiB | 14 Q