3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Stack Overflow+_)(*&^%$#{}[]<>@!~./=-'; //My string $shuffleTimes = 100; $table = new table($string, $shuffleTimes); class table { function __construct($string, $time) { $out = '<table cellpadding="5">'; $out .= $this->getRow('th', 'Nom., Shuffled String, Lenght'); for ($x = 1; $x <= $time; $x++) { $shuffledStr = str_shuffle($string); //Maybe this causes the problem $shuffledStr_len = mb_strlen($shuffledStr); $out .= $this->getRow('td', $x . ', ' . $shuffledStr . ', ' . $shuffledStr_len); } $out .= '</table>'; echo $out; } public function getRow($tagName, $contents_list) { //Variables: $out = ''; $contents_array = explode(', ', $contents_list); $contents_number = count($contents_array); $start_tag = '<' . $tagName . '>'; $end_tag = '</' . $tagName . '>'; // Build $out .= '<tr>'; for ($i = 0; $i < $contents_number; $i++) { $out .= $start_tag . $contents_array[$i] . $end_tag; } $out .= '</tr>'; return $out; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rtYHD
function name:  (null)
number of ops:  8
compiled vars:  !0 = $string, !1 = $shuffleTimes, !2 = $table
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Stack+Overflow%2B_%29%28%2A%26%5E%25%24%23%7B%7D%5B%5D%3C%3E%40%21%7E.%2F%3D-'
    4     1        ASSIGN                                                   !1, 100
    5     2        NEW                                              $5      'table'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $5
   47     7      > RETURN                                                   1

Class table:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 10
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 10
Branch analysis from position: 30
Branch analysis from position: 10
filename:       /in/rtYHD
function name:  __construct
number of ops:  33
compiled vars:  !0 = $string, !1 = $time, !2 = $out, !3 = $x, !4 = $shuffledStr, !5 = $shuffledStr_len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ASSIGN                                                   !2, '%3Ctable+cellpadding%3D%225%22%3E'
   12     3        INIT_METHOD_CALL                                         'getRow'
          4        SEND_VAL_EX                                              'th'
          5        SEND_VAL_EX                                              'Nom.%2C+Shuffled+String%2C+Lenght'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN_OP                                     8          !2, $7
   14     8        ASSIGN                                                   !3, 1
          9      > JMP                                                      ->28
   16    10    >   INIT_FCALL                                               'str_shuffle'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !4, $10
   17    14        INIT_FCALL                                               'mb_strlen'
         15        SEND_VAR                                                 !4
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !5, $12
   18    18        INIT_METHOD_CALL                                         'getRow'
         19        SEND_VAL_EX                                              'td'
         20        CONCAT                                           ~14     !3, '%2C+'
         21        CONCAT                                           ~15     ~14, !4
         22        CONCAT                                           ~16     ~15, '%2C+'
         23        CONCAT                                           ~17     ~16, !5
         24        SEND_VAL_EX                                              ~17
         25        DO_FCALL                                      0  $18     
         26        ASSIGN_OP                                     8          !2, $18
   14    27        PRE_INC                                                  !3
         28    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         29      > JMPNZ                                                    ~21, ->10
   21    30    >   ASSIGN_OP                                     8          !2, '%3C%2Ftable%3E'
   23    31        ECHO                                                     !2
   24    32      > RETURN                                                   null

End of function __construct

Function getrow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 19
Branch analysis from position: 26
Branch analysis from position: 19
filename:       /in/rtYHD
function name:  getRow
number of ops:  29
compiled vars:  !0 = $tagName, !1 = $contents_list, !2 = $out, !3 = $contents_array, !4 = $contents_number, !5 = $start_tag, !6 = $end_tag, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   29     2        ASSIGN                                                   !2, ''
   30     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2C+'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !3, $9
   31     8        COUNT                                            ~11     !3
          9        ASSIGN                                                   !4, ~11
   32    10        CONCAT                                           ~13     '%3C', !0
         11        CONCAT                                           ~14     ~13, '%3E'
         12        ASSIGN                                                   !5, ~14
   33    13        CONCAT                                           ~16     '%3C%2F', !0
         14        CONCAT                                           ~17     ~16, '%3E'
         15        ASSIGN                                                   !6, ~17
   36    16        ASSIGN_OP                                     8          !2, '%3Ctr%3E'
   38    17        ASSIGN                                                   !7, 0
         18      > JMP                                                      ->24
   39    19    >   FETCH_DIM_R                                      ~21     !3, !7
         20        CONCAT                                           ~22     !5, ~21
         21        CONCAT                                           ~23     ~22, !6
         22        ASSIGN_OP                                     8          !2, ~23
   38    23        PRE_INC                                                  !7
         24    >   IS_SMALLER                                               !7, !4
         25      > JMPNZ                                                    ~26, ->19
   42    26    >   ASSIGN_OP                                     8          !2, '%3C%2Ftr%3E'
   44    27      > RETURN                                                   !2
   45    28*     > RETURN                                                   null

End of function getrow

End of class table.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.18 ms | 1405 KiB | 19 Q