SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
http://www.exakat.io/
Exakat Engine
Smart Code Reviewing Engine
http://www.exakat.io/
http://www.exakat.io/
Let's clean for PHP 7
<?php
class foo {
    function bar() {
        echo 'I am not static!';
    }
}
foo::bar();
?>
10
%
vulnerable
http://www.exakat.io/
Let's clean for PHP 7
<?php
use foo2 as foo;
class foo2 {
    function bar() {
        echo 'I am not static!';
    }
}
foo::bar();
?>
Goal : Spot those issues for us
http://www.exakat.io/
Let's clean for PHP 7
<?php
use foo2 as foo;
class foo3 {
    function bar() {
        echo 'I am not static!';
    }
}
class foo2 extends foo3 { }
foo::bar();
?>
Goal : Spot those issues for us
http://www.exakat.io/
Let's clean for PHP 7
s foo;
extends foo3 { }
;
Goal : Spot those issues
<?php
class foo3 {
    function bar(
        echo 'I a
    }
}
?>
<?php
foo::bar();
?>
http://www.exakat.io/
PHP code as data
• Understand PHP code just like the binary
• Be able to query the database for special
constructs
• Apply this to PHP 7 migration
0 => 376 : T_OPEN_TAG (<?php
)
1 => 379 : T_WHITESPACE (
)
2 => 344 : T_USE (use)
3 => 379 : T_WHITESPACE ( )
4 => 310 : T_STRING (foo2)
5 => 379 : T_WHITESPACE ( )
6 => 329 : T_AS (as)
7 => 379 : T_WHITESPACE ( )
8 => 310 : T_STRING (foo)
;
10 => 379 : T_WHITESPACE (
)
11 => 358 : T_CLASS (class)
12 => 379 : T_WHITESPACE ( )
13 => 310 : T_STRING (foo3)
14 => 379 : T_WHITESPACE ( )
{
16 => 379 : T_WHITESPACE (
)
17 => 337 : T_FUNCTION (function)
18 => 379 : T_WHITESPACE ( )
19 => 310 : T_STRING (bar)
(
)
22 => 379 : T_WHITESPACE ( )
{
Tokenize PHP code 

into an AST
PHP 5, PHP 7
Psr-4
ClearPHP
Performance
 
 

<?php
/** Lots of code **/
class phpthumb {
/** Lots of code **/
function ErrorImage($text, $width=0, $height=0) {
$width = ($width ? $width : $this->config_error_image_width);
$height = ($height ? $height : $this->config_error_image_height);
/** Lots of code **/
http://www.exakat.io/reports/plogger/
http://www.exakat.io/
How to use it?
• Review current code
• Validate external code
• Prepare for future code
• Hunt bugs and dead code
• An eye over my shoulder
http://www.exakat.io/
Get it!
• Download on http://www.exakat.io/
• Open Source, and free
• Test it on your code
• I'm here, talk to me
• Try it online with phplint.com or at exakat.io
zelfs in het Nederlands, als je moedig bent
B
eta
tester
w
an
ted!
http://www.exakat.io/
The Exakat Engine
@exakat

Mais conteúdo relacionado

Mais procurados

Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)
James Titcumb
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
Joseph Scott
 

Mais procurados (20)

How the stack works(1)
How the stack works(1)How the stack works(1)
How the stack works(1)
 
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
 
PHP 5.3
PHP 5.3PHP 5.3
PHP 5.3
 
Php operators
Php operatorsPhp operators
Php operators
 
Errors, Exceptions & Logging (PHP Hants Oct '13)
Errors, Exceptions & Logging (PHP Hants Oct '13)Errors, Exceptions & Logging (PHP Hants Oct '13)
Errors, Exceptions & Logging (PHP Hants Oct '13)
 
Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)
 
[4developers2016] PHP 7 (Michał Pipa)
[4developers2016] PHP 7 (Michał Pipa)[4developers2016] PHP 7 (Michał Pipa)
[4developers2016] PHP 7 (Michał Pipa)
 
PHP 7.0 new features (and new interpreter)
PHP 7.0 new features (and new interpreter)PHP 7.0 new features (and new interpreter)
PHP 7.0 new features (and new interpreter)
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from inside
 
Surprise! It's PHP :) (unabridged)
Surprise! It's PHP :) (unabridged)Surprise! It's PHP :) (unabridged)
Surprise! It's PHP :) (unabridged)
 
ZF3 introduction
ZF3 introductionZF3 introduction
ZF3 introduction
 
Perl IO
Perl IOPerl IO
Perl IO
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
Operators in PHP
Operators in PHPOperators in PHP
Operators in PHP
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
 
Gwt wouter
Gwt wouterGwt wouter
Gwt wouter
 
Introduction to web and php mysql
Introduction to web and php mysqlIntroduction to web and php mysql
Introduction to web and php mysql
 

Destaque

Presentación sobre el hiv
Presentación sobre el hivPresentación sobre el hiv
Presentación sobre el hiv
luzdelalba82
 
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ioannis Kevrekidis
 

Destaque (20)

Teaching programming for kids
Teaching programming for kidsTeaching programming for kids
Teaching programming for kids
 
Code metrics in PHP
Code metrics in PHPCode metrics in PHP
Code metrics in PHP
 
Presentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notesPresentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notes
 
Presentación sobre el hiv
Presentación sobre el hivPresentación sobre el hiv
Presentación sobre el hiv
 
STORYTELLING
STORYTELLINGSTORYTELLING
STORYTELLING
 
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
 
Piracy
PiracyPiracy
Piracy
 
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляцииUniversity Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
 
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
 
How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
 
Social metadata on the web
Social metadata on the webSocial metadata on the web
Social metadata on the web
 
University Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасностьUniversity Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасность
 
Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017 Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017
 
Somar com o outono I
Somar com o outono I Somar com o outono I
Somar com o outono I
 
Social Media Trends 2014
Social Media Trends 2014Social Media Trends 2014
Social Media Trends 2014
 
Becoming a Systematic Entrepreneur?
Becoming a Systematic Entrepreneur?Becoming a Systematic Entrepreneur?
Becoming a Systematic Entrepreneur?
 
Meilleures photos national geo 2015
Meilleures photos national geo 2015Meilleures photos national geo 2015
Meilleures photos national geo 2015
 
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip VaughterKeynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
 
Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016
 
Proyecto "Song for a change"
Proyecto "Song for a change"Proyecto "Song for a change"
Proyecto "Song for a change"
 

Semelhante a Exakat for PHP : smart code reviewing engine

GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
Nat Weerawan
 
Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
Orange@php conf
Orange@php confOrange@php conf
Orange@php conf
Hash Lin
 

Semelhante a Exakat for PHP : smart code reviewing engine (20)

The why and how of moving to php 5.4
The why and how of moving to php 5.4The why and how of moving to php 5.4
The why and how of moving to php 5.4
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
 
Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)
 
Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and co
 
An introduction to PHP 5.4
An introduction to PHP 5.4An introduction to PHP 5.4
An introduction to PHP 5.4
 
Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧
 
Orange@php conf
Orange@php confOrange@php conf
Orange@php conf
 
The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
php 1
php 1php 1
php 1
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
 
CodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHPCodePolitan Webinar: The Rise of PHP
CodePolitan Webinar: The Rise of PHP
 
PHP Quiz
PHP QuizPHP Quiz
PHP Quiz
 

Mais de Damien Seguy

Mais de Damien Seguy (20)

Strong typing @ php leeds
Strong typing  @ php leedsStrong typing  @ php leeds
Strong typing @ php leeds
 
Strong typing : adoption, adaptation and organisation
Strong typing : adoption, adaptation and organisationStrong typing : adoption, adaptation and organisation
Strong typing : adoption, adaptation and organisation
 
Qui a laissé son mot de passe dans le code
Qui a laissé son mot de passe dans le codeQui a laissé son mot de passe dans le code
Qui a laissé son mot de passe dans le code
 
Analyse statique et applications
Analyse statique et applicationsAnalyse statique et applications
Analyse statique et applications
 
Top 10 pieges php afup limoges
Top 10 pieges php   afup limogesTop 10 pieges php   afup limoges
Top 10 pieges php afup limoges
 
Top 10 php classic traps DPC 2020
Top 10 php classic traps DPC 2020Top 10 php classic traps DPC 2020
Top 10 php classic traps DPC 2020
 
Meilleur du typage fort (AFUP Day, 2020)
Meilleur du typage fort (AFUP Day, 2020)Meilleur du typage fort (AFUP Day, 2020)
Meilleur du typage fort (AFUP Day, 2020)
 
Top 10 php classic traps confoo
Top 10 php classic traps confooTop 10 php classic traps confoo
Top 10 php classic traps confoo
 
Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4
 
Top 10 php classic traps php serbia
Top 10 php classic traps php serbiaTop 10 php classic traps php serbia
Top 10 php classic traps php serbia
 
Top 10 php classic traps
Top 10 php classic trapsTop 10 php classic traps
Top 10 php classic traps
 
Top 10 chausse trappes
Top 10 chausse trappesTop 10 chausse trappes
Top 10 chausse trappes
 
Code review workshop
Code review workshopCode review workshop
Code review workshop
 
Understanding static analysis php amsterdam 2018
Understanding static analysis   php amsterdam 2018Understanding static analysis   php amsterdam 2018
Understanding static analysis php amsterdam 2018
 
Review unknown code with static analysis php ce 2018
Review unknown code with static analysis   php ce 2018Review unknown code with static analysis   php ce 2018
Review unknown code with static analysis php ce 2018
 
Everything new with PHP 7.3
Everything new with PHP 7.3Everything new with PHP 7.3
Everything new with PHP 7.3
 
Php 7.3 et ses RFC (AFUP Toulouse)
Php 7.3 et ses RFC  (AFUP Toulouse)Php 7.3 et ses RFC  (AFUP Toulouse)
Php 7.3 et ses RFC (AFUP Toulouse)
 
Tout sur PHP 7.3 et ses RFC
Tout sur PHP 7.3 et ses RFCTout sur PHP 7.3 et ses RFC
Tout sur PHP 7.3 et ses RFC
 
Review unknown code with static analysis php ipc 2018
Review unknown code with static analysis   php ipc 2018Review unknown code with static analysis   php ipc 2018
Review unknown code with static analysis php ipc 2018
 
Code review for busy people
Code review for busy peopleCode review for busy people
Code review for busy people
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Exakat for PHP : smart code reviewing engine

  • 3. http://www.exakat.io/ Let's clean for PHP 7 <?php class foo {     function bar() {         echo 'I am not static!';     } } foo::bar(); ?> 10 % vulnerable
  • 4. http://www.exakat.io/ Let's clean for PHP 7 <?php use foo2 as foo; class foo2 {     function bar() {         echo 'I am not static!';     } } foo::bar(); ?> Goal : Spot those issues for us
  • 5. http://www.exakat.io/ Let's clean for PHP 7 <?php use foo2 as foo; class foo3 {     function bar() {         echo 'I am not static!';     } } class foo2 extends foo3 { } foo::bar(); ?> Goal : Spot those issues for us
  • 6. http://www.exakat.io/ Let's clean for PHP 7 s foo; extends foo3 { } ; Goal : Spot those issues <?php class foo3 {     function bar(         echo 'I a     } } ?> <?php foo::bar(); ?>
  • 7. http://www.exakat.io/ PHP code as data • Understand PHP code just like the binary • Be able to query the database for special constructs • Apply this to PHP 7 migration
  • 8. 0 => 376 : T_OPEN_TAG (<?php ) 1 => 379 : T_WHITESPACE ( ) 2 => 344 : T_USE (use) 3 => 379 : T_WHITESPACE ( ) 4 => 310 : T_STRING (foo2) 5 => 379 : T_WHITESPACE ( ) 6 => 329 : T_AS (as) 7 => 379 : T_WHITESPACE ( ) 8 => 310 : T_STRING (foo) ; 10 => 379 : T_WHITESPACE ( ) 11 => 358 : T_CLASS (class) 12 => 379 : T_WHITESPACE ( ) 13 => 310 : T_STRING (foo3) 14 => 379 : T_WHITESPACE ( ) { 16 => 379 : T_WHITESPACE ( ) 17 => 337 : T_FUNCTION (function) 18 => 379 : T_WHITESPACE ( ) 19 => 310 : T_STRING (bar) ( ) 22 => 379 : T_WHITESPACE ( ) {
  • 9. Tokenize PHP code 
 into an AST
  • 10. PHP 5, PHP 7 Psr-4 ClearPHP Performance     
  • 11. <?php /** Lots of code **/ class phpthumb { /** Lots of code **/ function ErrorImage($text, $width=0, $height=0) { $width = ($width ? $width : $this->config_error_image_width); $height = ($height ? $height : $this->config_error_image_height); /** Lots of code **/
  • 12.
  • 14.
  • 15. http://www.exakat.io/ How to use it? • Review current code • Validate external code • Prepare for future code • Hunt bugs and dead code • An eye over my shoulder
  • 16. http://www.exakat.io/ Get it! • Download on http://www.exakat.io/ • Open Source, and free • Test it on your code • I'm here, talk to me • Try it online with phplint.com or at exakat.io zelfs in het Nederlands, als je moedig bent B eta tester w an ted!