3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = <<<TEST {De nombreuses entreprises {|dans le {secteur|domaine} {de la communication|des médias|des services|de la vente {|en ligne}|du e-commerce|du commerce en ligne}}|{De nombreuses personnes|De nombreux {cadres|professionnels}} {dont le {métier|rôle} est de {communiquer|gérer la communication|gérer la relation-clients}|qui {travaillent|officient} dans {la communication|les relations avec les clients|la publicité|le marketing}}} {utilisent|se servent de} {notre {service|offre|plateforme|API}|nos {services|offres|plateformes|API}} pour {envoyer leurs SMS|générer du CA|augmenter leurs {ventes|revenus|bénéfices}|gérer leurs campagnes} {|et {ça|cela} {marche|semble marcher}|et {la réussite|le succès} {est|semble|semble être} {là|au rendez-vous}|et tout le monde {{est|semble|semble être} {satisfait|content}|y gagne}}. TEST; for ($j = 1; $j <= 10; $j++) { $out = array(); if(preg_match("|\{[^\{\}]+\}|",$a)){ echo ('ttttt'.$j.'ttt'); }; preg_match_all("|\{[^\{\}]+\}|",$a,$out, PREG_PATTERN_ORDER); if (empty($out)) { die($j); break; } //print_r($out); $depth = $j; $outCleanned = array_map(function($value) use ($depth) { $value = str_replace('{', 'A' . $depth . 'A', $value); $value = str_replace('|', 'B' . $depth . 'B', $value); $value = str_replace('}', 'C' . $depth . 'C', $value); return $value; }, $out); $b = $a; foreach ($out as $i => $value) { $b = str_replace($value, $outCleanned[$i], $b); } $a = $b; //print_r($outCleanned); } $a = str_replace("A4A", "\n{\n", $a); $a = str_replace("B4B", "|", $a); $a = str_replace("C4C", "\n}\n", $a); $a = str_replace("A3A", "\n\t{\n\t", $a); $a = str_replace("B3B", "|", $a); $a = str_replace("C3C", "\n\t}\n\t", $a); $a = str_replace("A2A", "\n\t\t{\n\t\t", $a); $a = str_replace("B2B", "|", $a); $a = str_replace("C2C", "\n\t\t}\n\t\t", $a); $a = str_replace("A1A", "{", $a); $a = str_replace("B1B", "|", $a); $a = str_replace("C1C", "}", $a); echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 3
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 42
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 42
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 3
Branch analysis from position: 47
Branch analysis from position: 3
Branch analysis from position: 42
Branch analysis from position: 12
filename:       /in/1KBvF
function name:  (null)
number of ops:  121
compiled vars:  !0 = $a, !1 = $j, !2 = $out, !3 = $depth, !4 = $outCleanned, !5 = $b, !6 = $value, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7BDe+nombreuses+entreprises+%7B%7Cdans+le+%7Bsecteur%7Cdomaine%7D+%7Bde+la+communication%7Cdes+m%C3%A9dias%7Cdes+services%7Cde+la+vente+%7B%7Cen+ligne%7D%7Cdu+e-commerce%7Cdu+commerce+en+ligne%7D%7D%7C%7BDe+nombreuses+personnes%7CDe+nombreux+%7Bcadres%7Cprofessionnels%7D%7D+%7Bdont+le+%7Bm%C3%A9tier%7Cr%C3%B4le%7D+est+de+%7Bcommuniquer%7Cg%C3%A9rer+la+communication%7Cg%C3%A9rer+la+relation-clients%7D%7Cqui+%7Btravaillent%7Cofficient%7D+dans+%7Bla+communication%7Cles+relations+avec+les+clients%7Cla+publicit%C3%A9%7Cle+marketing%7D%7D%7D+%7Butilisent%7Cse+servent+de%7D+%7Bnotre+%7Bservice%7Coffre%7Cplateforme%7CAPI%7D%7Cnos+%7Bservices%7Coffres%7Cplateformes%7CAPI%7D%7D+pour+%7Benvoyer+leurs+SMS%7Cg%C3%A9n%C3%A9rer+du+CA%7Caugmenter+leurs+%7Bventes%7Crevenus%7Cb%C3%A9n%C3%A9fices%7D%7Cg%C3%A9rer+leurs+campagnes%7D+%7B%7Cet+%7B%C3%A7a%7Ccela%7D+%7Bmarche%7Csemble+marcher%7D%7Cet+%7Bla+r%C3%A9ussite%7Cle+succ%C3%A8s%7D+%7Best%7Csemble%7Csemble+%C3%AAtre%7D+%7Bl%C3%A0%7Cau+rendez-vous%7D%7Cet+tout+le+monde+%7B%7Best%7Csemble%7Csemble+%C3%AAtre%7D+%7Bsatisfait%7Ccontent%7D%7Cy+gagne%7D%7D.'
    7     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->45
    9     3    >   ASSIGN                                                   !2, <array>
   10     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%7C%5C%7B%5B%5E%5C%7B%5C%7D%5D%2B%5C%7D%7C'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $11     
          8      > JMPZ                                                     $11, ->12
   11     9    >   CONCAT                                           ~12     'ttttt', !1
         10        CONCAT                                           ~13     ~12, 'ttt'
         11        ECHO                                                     ~13
   14    12    >   INIT_FCALL                                               'preg_match_all'
         13        SEND_VAL                                                 '%7C%5C%7B%5B%5E%5C%7B%5C%7D%5D%2B%5C%7D%7C'
         14        SEND_VAR                                                 !0
         15        SEND_REF                                                 !2
         16        SEND_VAL                                                 1
         17        DO_ICALL                                                 
   17    18        ISSET_ISEMPTY_CV                                         !2
         19      > JMPZ                                                     ~15, ->22
   18    20    > > EXIT                                                     !1
   19    21*       JMP                                                      ->47
   23    22    >   ASSIGN                                                   !3, !1
   24    23        INIT_FCALL                                               'array_map'
         24        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1KBvF%3A24%240'
         25        BIND_LEXICAL                                             ~17, !3
   29    26        SEND_VAL                                                 ~17
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $18     
   24    29        ASSIGN                                                   !4, $18
   31    30        ASSIGN                                                   !5, !0
   32    31      > FE_RESET_R                                       $21     !2, ->42
         32    > > FE_FETCH_R                                       ~22     $21, !6, ->42
         33    >   ASSIGN                                                   !7, ~22
   33    34        INIT_FCALL                                               'str_replace'
         35        SEND_VAR                                                 !6
         36        FETCH_DIM_R                                      ~24     !4, !7
         37        SEND_VAL                                                 ~24
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                         $25     
         40        ASSIGN                                                   !5, $25
   32    41      > JMP                                                      ->32
         42    >   FE_FREE                                                  $21
   36    43        ASSIGN                                                   !0, !5
    7    44        PRE_INC                                                  !1
         45    >   IS_SMALLER_OR_EQUAL                                      !1, 10
         46      > JMPNZ                                                    ~29, ->3
   40    47    >   INIT_FCALL                                               'str_replace'
         48        SEND_VAL                                                 'A4A'
         49        SEND_VAL                                                 '%0A%7B%0A'
         50        SEND_VAR                                                 !0
         51        DO_ICALL                                         $30     
         52        ASSIGN                                                   !0, $30
   41    53        INIT_FCALL                                               'str_replace'
         54        SEND_VAL                                                 'B4B'
         55        SEND_VAL                                                 '%7C'
         56        SEND_VAR                                                 !0
         57        DO_ICALL                                         $32     
         58        ASSIGN                                                   !0, $32
   42    59        INIT_FCALL                                               'str_replace'
         60        SEND_VAL                                                 'C4C'
         61        SEND_VAL                                                 '%0A%7D%0A'
         62        SEND_VAR                                                 !0
         63        DO_ICALL                                         $34     
         64        ASSIGN                                                   !0, $34
   44    65        INIT_FCALL                                               'str_replace'
         66        SEND_VAL                                                 'A3A'
         67        SEND_VAL                                                 '%0A%09%7B%0A%09'
         68        SEND_VAR                                                 !0
         69        DO_ICALL                                         $36     
         70        ASSIGN                                                   !0, $36
   45    71        INIT_FCALL                                               'str_replace'
         72        SEND_VAL                                                 'B3B'
         73        SEND_VAL                                                 '%7C'
         74        SEND_VAR                                                 !0
         75        DO_ICALL                                         $38     
         76        ASSIGN                                                   !0, $38
   46    77        INIT_FCALL                                               'str_replace'
         78        SEND_VAL                                                 'C3C'
         79        SEND_VAL                                                 '%0A%09%7D%0A%09'
         80        SEND_VAR                                                 !0
         81        DO_ICALL                                         $40     
         82        ASSIGN                                                   !0, $40
   48    83        INIT_FCALL                                               'str_replace'
         84        SEND_VAL                                                 'A2A'
         85        SEND_VAL                                                 '%0A%09%09%7B%0A%09%09'
         86        SEND_VAR                                                 !0
         87        DO_ICALL                                         $42     
         88        ASSIGN                                                   !0, $42
   49    89        INIT_FCALL                                               'str_replace'
         90        SEND_VAL                                                 'B2B'
         91        SEND_VAL                                                 '%7C'
         92        SEND_VAR                                                 !0
         93        DO_ICALL                                         $44     
         94        ASSIGN                                                   !0, $44
   50    95        INIT_FCALL                                               'str_replace'
         96        SEND_VAL                                                 'C2C'
         97        SEND_VAL                                                 '%0A%09%09%7D%0A%09%09'
         98        SEND_VAR                                                 !0
         99        DO_ICALL                                         $46     
        100        ASSIGN                                                   !0, $46
   52   101        INIT_FCALL                                               'str_replace'
        102        SEND_VAL                                                 'A1A'
        103        SEND_VAL                                                 '%7B'
        104        SEND_VAR                                                 !0
        105        DO_ICALL                                         $48     
        106        ASSIGN                                                   !0, $48
   53   107        INIT_FCALL                                               'str_replace'
        108        SEND_VAL                                                 'B1B'
        109        SEND_VAL                                                 '%7C'
        110        SEND_VAR                                                 !0
        111        DO_ICALL                                         $50     
        112        ASSIGN                                                   !0, $50
   54   113        INIT_FCALL                                               'str_replace'
        114        SEND_VAL                                                 'C1C'
        115        SEND_VAL                                                 '%7D'
        116        SEND_VAR                                                 !0
        117        DO_ICALL                                         $52     
        118        ASSIGN                                                   !0, $52
   56   119        ECHO                                                     !0
        120      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1KBvF%3A24%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1KBvF
function name:  {closure}
number of ops:  28
compiled vars:  !0 = $value, !1 = $depth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   25     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%7B'
          4        CONCAT                                           ~2      'A', !1
          5        CONCAT                                           ~3      ~2, 'A'
          6        SEND_VAL                                                 ~3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !0, $4
   26    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '%7C'
         12        CONCAT                                           ~6      'B', !1
         13        CONCAT                                           ~7      ~6, 'B'
         14        SEND_VAL                                                 ~7
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !0, $8
   27    18        INIT_FCALL                                               'str_replace'
         19        SEND_VAL                                                 '%7D'
         20        CONCAT                                           ~10     'C', !1
         21        CONCAT                                           ~11     ~10, 'C'
         22        SEND_VAL                                                 ~11
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $12     
         25        ASSIGN                                                   !0, $12
   28    26      > RETURN                                                   !0
   29    27*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1KBvF%3A24%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.72 ms | 1408 KiB | 21 Q