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); } var_dump(implode(', ', array_slice($emailed, 0, 10))); 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 = 36
Branch analysis from position: 36
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 = 36
Branch analysis from position: 36
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 = 36
Branch analysis from position: 36
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/pcPh2
function name:  (null)
number of ops:  50
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                                                      ->36
    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                                                      ->36
   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                                                      ->36
   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        ASSIGN                                                   !2, ~23
   17    36    >   INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'implode'
         38        SEND_VAL                                                 '%2C+'
         39        INIT_FCALL                                               'array_slice'
         40        SEND_VAR                                                 !0
         41        SEND_VAL                                                 0
         42        SEND_VAL                                                 10
         43        DO_ICALL                                         $25     
         44        SEND_VAR                                                 $25
         45        DO_ICALL                                         $26     
         46        SEND_VAR                                                 $26
         47        DO_ICALL                                                 
   19    48        ECHO                                                     !2
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.76 ms | 1400 KiB | 19 Q