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 (isset($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 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/43FOB
function name:  (null)
number of ops:  17
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    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, !3
         10      > JMPNZ                                                    ~12, ->6
    9    11    >   ROPE_INIT                                     4  ~14     'Lines%3A+'
         12        ROPE_ADD                                      1  ~14     ~14, !2
         13        ROPE_ADD                                      2  ~14     ~14, '+-+Words%3A+'
         14        ROPE_END                                      3  ~13     ~14, !1
         15        ECHO                                                     ~13
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.58 ms | 1394 KiB | 13 Q