3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p =<<<EOT That interviews should involve simple code is now common wisdom in programming circles. The story is that a high percentage of programmers, even people with impressive resumes, “just can’t code.” Asked to do the simplest things—problems a good coders could solve as fast they could write—some spend ten or twenty minutes before they get an answer, or fail entirely. (See discussion by Jeff Attwood and Joel Spolsky.) I don’t go as far as others here. I think a lot of “slow coders” are probably excellent employees, making up for it in other areas. Some projects don’t need speed. Some people just need to spend more time programming; everyone was a slow programmer some time. But I know from experience that slow coders don’t work at LibraryThing. They don’t fit the LibraryThing development culture. EOT; $pattern = '[\w\d]+'; $words = array(); preg_match_all('/'.$pattern.'/', $p, $words); $words = $words[0]; $result = array(); foreach ($words as $word) { $len = mb_strlen($word); $result[$len]++; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/KSVWo
function name:  (null)
number of ops:  24
compiled vars:  !0 = $p, !1 = $pattern, !2 = $words, !3 = $result, !4 = $word, !5 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'That+interviews+should+involve+simple+code+is+now+common+wisdom+in+programming+circles.+The+story+is+that+a+high+percentage+of+programmers%2C+even+people+with+impressive+resumes%2C+%E2%80%9Cjust+can%E2%80%99t+code.%E2%80%9D+Asked+to+do+the+simplest+things%E2%80%94problems+a+good+coders+could+solve+as+fast+they+could+write%E2%80%94some+spend+ten+or+twenty+minutes+before+they+get+an+answer%2C+or+fail+entirely.+%28See+discussion+by+Jeff+Attwood+and+Joel+Spolsky.%29+I+don%E2%80%99t+go+as+far+as+others+here.+I+think+a+lot+of+%E2%80%9Cslow+coders%E2%80%9D+are+probably+excellent+employees%2C+making+up+for+it+in+other+areas.+Some+projects+don%E2%80%99t+need+speed.+Some+people+just+need+to+spend+more+time+programming%3B+everyone+was+a+slow+programmer+some+time.+But+I+know+from+experience+that+slow+coders+don%E2%80%99t+work+at+LibraryThing.+They+don%E2%80%99t+fit+the+LibraryThing+development+culture.'
    5     1        ASSIGN                                                   !1, '%5B%5Cw%5Cd%5D%2B'
    6     2        ASSIGN                                                   !2, <array>
    7     3        INIT_FCALL                                               'preg_match_all'
          4        CONCAT                                           ~9      '%2F', !1
          5        CONCAT                                           ~10     ~9, '%2F'
          6        SEND_VAL                                                 ~10
          7        SEND_VAR                                                 !0
          8        SEND_REF                                                 !2
          9        DO_ICALL                                                 
    8    10        FETCH_DIM_R                                      ~12     !2, 0
         11        ASSIGN                                                   !2, ~12
   10    12        ASSIGN                                                   !3, <array>
   11    13      > FE_RESET_R                                       $15     !2, ->22
         14    > > FE_FETCH_R                                               $15, !4, ->22
   12    15    >   INIT_FCALL                                               'mb_strlen'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !5, $16
   13    19        FETCH_DIM_RW                                     $18     !3, !5
         20        PRE_INC                                                  $18
   11    21      > JMP                                                      ->14
         22    >   FE_FREE                                                  $15
   14    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.66 ms | 1396 KiB | 17 Q