3v4l.org

run code in 300+ PHP versions simultaneously
<?php $src = array('foo : bar', 'foo...bar', 'this ---- is a . .. ¤@££@$ test'); $words = 0; $lines = sizeof($src); $i = 0; while (false !== ($src[$i])) { $words += count($src[$i]); } echo "Lines: $lines - Words: $words";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/h0qQX
function name:  (null)
number of ops:  18
compiled vars:  !0 = $src, !1 = $words, !2 = $lines, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    4     2        COUNT                                            ~6      !0
          3        ASSIGN                                                   !2, ~6
    5     4        ASSIGN                                                   !3, 0
    6     5      > JMP                                                      ->9
    7     6    >   FETCH_DIM_R                                      ~9      !0, !3
          7        COUNT                                            ~10     ~9
          8        ASSIGN_OP                                     1          !1, ~10
    6     9    >   FETCH_DIM_R                                      ~12     !0, !3
         10        TYPE_CHECK                                  1018          ~12
         11      > JMPNZ                                                    ~13, ->6
    9    12    >   ROPE_INIT                                     4  ~15     'Lines%3A+'
         13        ROPE_ADD                                      1  ~15     ~15, !2
         14        ROPE_ADD                                      2  ~15     ~15, '+-+Words%3A+'
         15        ROPE_END                                      3  ~14     ~15, !1
         16        ECHO                                                     ~14
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.22 ms | 1394 KiB | 13 Q