SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
1	
  
• 

• 

• 
     – 

• 
     – 
 
• 
• 
• 
• 
• 
• 
• 
• 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
•    • 
• 
• 
• 
• 
• 
• 
• 
• 
• 

     $ pfff -parse_php <dir or file>
     	
  
• 
• 
     $ sgrep -e ‘strstr(...) == false’ *.php
     	
  




     $ find .   name *.php | xargs grep ‘strstr(...) == false’
     	
  


                                                                 	
  
• 

     $ sgrep -e ‘foo(..., 1, ...)’ *.php
     	
  




     $hoge	
  =	
  $a-­‐>foo($spam,	
  1,	
  $egg) //	
                                                                                      	
  
     	
  
     $hoge	
  =	
  $a-­‐>foo($spam,	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
                              OK	
  
     	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  1,	
  
     	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $egg)	
  
• 
• 
     //remove_second_arg_foo.spatch
     foo(X
     -  ,Y
         )

     //	
  remove_second_arg_foo_alt.spatch	
  
     -­‐	
  	
  	
  	
  foo(X,Y)	
  
     +	
  	
  	
  foo(X)	
  
• 
     $ spatch -c <patch> *.php
     	
  
• 

• 
• 
     function foo($avar) {
         return $avarr;
     }


     $	
  scheck	
  test.php	
  
     demos/scheck.php:4:9:	
  CHECK:	
  use	
  of	
  undefined	
  variable	
  $avarr	
  
     demos/scheck.php:3:13:	
  CHECK:	
  unused	
  Param	
  variable	
  $avar	
  
• 
• 

• 

     – 
Linux	
  2.6	
  
Android	
  
• 



• 
     – 
• 

• 
     –  lang_xxx/parsing/lexer_xxx.mll
• 
     –  lang_xxx/parsing/ast_xxx.ml
• 
     –  lang_xxx/parsing/ast_xxx.ml
• 



• 
• 

• 
• 

Contenu connexe

Tendances

Php mysql cours
Php mysql coursPhp mysql cours
Php mysql courszan
 
การบันทึกและการออกจากโปรแกรม
การบันทึกและการออกจากโปรแกรมการบันทึกและการออกจากโปรแกรม
การบันทึกและการออกจากโปรแกรมเทวัญ ภูพานทอง
 
calendari i documentació preinscripció
calendari i documentació preinscripciócalendari i documentació preinscripció
calendari i documentació preinscripcióCeip Les Pinediques
 
Top 10 chausse trappes
Top 10 chausse trappesTop 10 chausse trappes
Top 10 chausse trappesDamien Seguy
 
Php 7.4 2020-01-28 - afup
Php 7.4   2020-01-28 - afupPhp 7.4   2020-01-28 - afup
Php 7.4 2020-01-28 - afupJulien Vinber
 
Exploiter php 5
Exploiter php 5Exploiter php 5
Exploiter php 5halleck45
 
[FR] Injection de dépendances, Containers & PHP-DI
[FR] Injection de dépendances, Containers & PHP-DI[FR] Injection de dépendances, Containers & PHP-DI
[FR] Injection de dépendances, Containers & PHP-DImatthieunapoli
 
PHP 7 et Symfony 3
PHP 7 et Symfony 3PHP 7 et Symfony 3
PHP 7 et Symfony 3Eddy RICHARD
 
JavaScript prise en main et fondamentaux
JavaScript prise en main et fondamentauxJavaScript prise en main et fondamentaux
JavaScript prise en main et fondamentauxVincent Petetin
 
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2Copies CAPEPS Major 2010 Écrit 1 & Écrit 2
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2Cyril Schmit
 
Bases de php - partie 2
Bases de php - partie 2Bases de php - partie 2
Bases de php - partie 2Régis Lutter
 

Tendances (18)

Php mysql cours
Php mysql coursPhp mysql cours
Php mysql cours
 
การบันทึกและการออกจากโปรแกรม
การบันทึกและการออกจากโปรแกรมการบันทึกและการออกจากโปรแกรม
การบันทึกและการออกจากโปรแกรม
 
calendari i documentació preinscripció
calendari i documentació preinscripciócalendari i documentació preinscripció
calendari i documentació preinscripció
 
Cours php
Cours phpCours php
Cours php
 
Top 10 chausse trappes
Top 10 chausse trappesTop 10 chausse trappes
Top 10 chausse trappes
 
Php 7.4 2020-01-28 - afup
Php 7.4   2020-01-28 - afupPhp 7.4   2020-01-28 - afup
Php 7.4 2020-01-28 - afup
 
Exploiter php 5
Exploiter php 5Exploiter php 5
Exploiter php 5
 
[FR] Injection de dépendances, Containers & PHP-DI
[FR] Injection de dépendances, Containers & PHP-DI[FR] Injection de dépendances, Containers & PHP-DI
[FR] Injection de dépendances, Containers & PHP-DI
 
PHP 7 et Symfony 3
PHP 7 et Symfony 3PHP 7 et Symfony 3
PHP 7 et Symfony 3
 
PHP &amp; MySQL
PHP &amp; MySQLPHP &amp; MySQL
PHP &amp; MySQL
 
Langage Perl
Langage PerlLangage Perl
Langage Perl
 
Chap2
Chap2Chap2
Chap2
 
JavaScript prise en main et fondamentaux
JavaScript prise en main et fondamentauxJavaScript prise en main et fondamentaux
JavaScript prise en main et fondamentaux
 
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2Copies CAPEPS Major 2010 Écrit 1 & Écrit 2
Copies CAPEPS Major 2010 Écrit 1 & Écrit 2
 
Bases de php - partie 2
Bases de php - partie 2Bases de php - partie 2
Bases de php - partie 2
 
Djaerombe luc
Djaerombe lucDjaerombe luc
Djaerombe luc
 
Nietzsche - Origem Da Tragedia
Nietzsche - Origem Da TragediaNietzsche - Origem Da Tragedia
Nietzsche - Origem Da Tragedia
 
Titre foncier 3
Titre foncier 3Titre foncier 3
Titre foncier 3
 

Plus de Yoshifumi Yamaguchi

20130824 Lightweight Language "Go" @LL matsuri
20130824 Lightweight Language "Go" @LL matsuri20130824 Lightweight Language "Go" @LL matsuri
20130824 Lightweight Language "Go" @LL matsuriYoshifumi Yamaguchi
 
20130316 プログラミング言語Go
20130316 プログラミング言語Go20130316 プログラミング言語Go
20130316 プログラミング言語GoYoshifumi Yamaguchi
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)Yoshifumi Yamaguchi
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpYoshifumi Yamaguchi
 
Sphinxで翻訳してたら本が出てた話
Sphinxで翻訳してたら本が出てた話Sphinxで翻訳してたら本が出てた話
Sphinxで翻訳してたら本が出てた話Yoshifumi Yamaguchi
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトYoshifumi Yamaguchi
 
[20120410] @marqsの転職を祝うLT
[20120410] @marqsの転職を祝うLT[20120410] @marqsの転職を祝うLT
[20120410] @marqsの転職を祝うLTYoshifumi Yamaguchi
 
[20110129] sphinx theme collection 2011春
[20110129] sphinx theme collection 2011春[20110129] sphinx theme collection 2011春
[20110129] sphinx theme collection 2011春Yoshifumi Yamaguchi
 
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)Yoshifumi Yamaguchi
 

Plus de Yoshifumi Yamaguchi (10)

20130824 Lightweight Language "Go" @LL matsuri
20130824 Lightweight Language "Go" @LL matsuri20130824 Lightweight Language "Go" @LL matsuri
20130824 Lightweight Language "Go" @LL matsuri
 
20130316 プログラミング言語Go
20130316 プログラミング言語Go20130316 プログラミング言語Go
20130316 プログラミング言語Go
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjp
 
Sphinxで翻訳してたら本が出てた話
Sphinxで翻訳してたら本が出てた話Sphinxで翻訳してたら本が出てた話
Sphinxで翻訳してたら本が出てた話
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクト
 
[20120410] @marqsの転職を祝うLT
[20120410] @marqsの転職を祝うLT[20120410] @marqsの転職を祝うLT
[20120410] @marqsの転職を祝うLT
 
YouTube APIの紹介
YouTube APIの紹介YouTube APIの紹介
YouTube APIの紹介
 
[20110129] sphinx theme collection 2011春
[20110129] sphinx theme collection 2011春[20110129] sphinx theme collection 2011春
[20110129] sphinx theme collection 2011春
 
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
 

[20110219] pfffについて

  • 2.
  • 3.
  • 4.
  • 5. •  •  •  –  •  – 
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.  
  • 13.
  • 14.
  • 15.
  • 17.
  • 18.
  • 19.
  • 20.
  • 22. •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  • 
  • 23.
  • 24. •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  • 
  • 25. •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  • 
  • 26.
  • 27.
  • 28.
  • 30. •  •  $ pfff -parse_php <dir or file>  
  • 31. •  •  $ sgrep -e ‘strstr(...) == false’ *.php   $ find . name *.php | xargs grep ‘strstr(...) == false’    
  • 32. •  $ sgrep -e ‘foo(..., 1, ...)’ *.php   $hoge  =  $a-­‐>foo($spam,  1,  $egg) //       $hoge  =  $a-­‐>foo($spam,                                    //   OK                                                                1,                                                                $egg)  
  • 33. •  •  //remove_second_arg_foo.spatch foo(X -  ,Y ) //  remove_second_arg_foo_alt.spatch   -­‐        foo(X,Y)   +      foo(X)  
  • 34. •  $ spatch -c <patch> *.php  
  • 36. •  function foo($avar) { return $avarr; } $  scheck  test.php   demos/scheck.php:4:9:  CHECK:  use  of  undefined  variable  $avarr   demos/scheck.php:3:13:  CHECK:  unused  Param  variable  $avar  
  • 37.
  • 41. •  •  – 
  • 42.
  • 43.
  • 44.
  • 45. •  •  –  lang_xxx/parsing/lexer_xxx.mll •  –  lang_xxx/parsing/ast_xxx.ml •  –  lang_xxx/parsing/ast_xxx.ml
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.