3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emailed = array('cam.hurd@gmail.com', 'jeremy@derp.com', 'boooooooooop', 'dlfjdflkj', 'cam.hurd@gmail.com', 'jeremy@derp.com', 'boooooooooop', 'dlfjdflkj','cam.hurd@gmail.com', 'jeremy@derp.com', 'boooooooooop', 'dlfjdflkj'); $numberOfInvites = count($emailed); if ( $numberOfInvites == 1 ) { $message = $emailed[0] . ' was invited.'; } else if ( $numberOfInvites == 2) { $message = $emailed[0] . ' and ' . $emailed[0] . ' were invited.'; } else if ( $numberOfInvites > 2 and $numberOfInvites < 11 ) { $message = 'Invites sent to: ' . implode(', ', $emailed); } else { $message = 'Invites sent to: ' . implode(', ', $emailed) . ' and ' . count($emailed - 10) . ' others!'; } echo $message;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 18
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/CZsnF
function name:  (null)
number of ops:  43
compiled vars:  !0 = $emailed, !1 = $numberOfInvites, !2 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~4      !0
          2        ASSIGN                                                   !1, ~4
    7     3        IS_EQUAL                                                 !1, 1
          4      > JMPZ                                                     ~6, ->9
    8     5    >   FETCH_DIM_R                                      ~7      !0, 0
          6        CONCAT                                           ~8      ~7, '+was+invited.'
          7        ASSIGN                                                   !2, ~8
          8      > JMP                                                      ->41
    9     9    >   IS_EQUAL                                                 !1, 2
         10      > JMPZ                                                     ~10, ->18
   10    11    >   FETCH_DIM_R                                      ~11     !0, 0
         12        CONCAT                                           ~12     ~11, '+and+'
         13        FETCH_DIM_R                                      ~13     !0, 0
         14        CONCAT                                           ~14     ~12, ~13
         15        CONCAT                                           ~15     ~14, '+were+invited.'
         16        ASSIGN                                                   !2, ~15
         17      > JMP                                                      ->41
   11    18    >   IS_SMALLER                                       ~17     2, !1
         19      > JMPZ_EX                                          ~17     ~17, ->22
         20    >   IS_SMALLER                                       ~18     !1, 11
         21        BOOL                                             ~17     ~18
         22    > > JMPZ                                                     ~17, ->30
   12    23    >   INIT_FCALL                                               'implode'
         24        SEND_VAL                                                 '%2C+'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $19     
         27        CONCAT                                           ~20     'Invites+sent+to%3A+', $19
         28        ASSIGN                                                   !2, ~20
         29      > JMP                                                      ->41
   14    30    >   INIT_FCALL                                               'implode'
         31        SEND_VAL                                                 '%2C+'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $22     
         34        CONCAT                                           ~23     'Invites+sent+to%3A+', $22
         35        CONCAT                                           ~24     ~23, '+and+'
         36        SUB                                              ~25     !0, 10
         37        COUNT                                            ~26     ~25
         38        CONCAT                                           ~27     ~24, ~26
         39        CONCAT                                           ~28     ~27, '+others%21'
         40        ASSIGN                                                   !2, ~28
   17    41    >   ECHO                                                     !2
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1392 KiB | 15 Q