Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Debug interactively PHP BLT #7
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sota Sugiura
May 22, 2017
Technology
1.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Debug interactively PHP BLT #7
Sota Sugiura
May 22, 2017
More Decks by Sota Sugiura
See All by Sota Sugiura
内製したSlack Appで頑張るIncident Response@Waroom Meetup #1 / Incident Response with Slack App in 10X
sota1235
0
2k
20220926_セキュリティチームの今_for_Drs._Prime_公開用.pdf
sota1235
0
220
再発防止策を考える技術 / #phpconsen
sota1235
10
4.1k
How to choose the best npm module for your team?
sota1235
9
680
Realtime Database for high traffic production application
sota1235
7
4.3k
Road to migrate JP Web as a microservice
sota1235
4
1.8k
インターフェース再入門 / Think Interface again
sota1235
6
11k
再発防止策を考える技術 #phpconfuk_rej
sota1235
1
1.4k
Update around Firebase #io18
sota1235
3
4.5k
Other Decks in Technology
See All in Technology
Meet AgentCore Identity Consent Portal
hironobuiga
3
190
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
400
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
310
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
130
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
560
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
870
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
260
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
0
270
継続的なAIコスト最適化
bgpat
1
180
分析AIエージェントを育てる、動く環境を育てる
codatum
0
130
Claude Code本は、どのように執筆チームで書かれたか
oikon48
0
250
ミイダス株式会社 テックチームのご紹介 / MIIDAS Tech Team
miidas
0
160
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
370
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
What's in a price? How to price your products and services
michaelherold
247
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
420
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Transcript
Debug interactively @sota1235
var_dump($sota1235); • @sota1235 • Call me ‘kirin’ • PHP &
JavaScript • Mercari, Inc.
http://sota1235.hatenablog.com/entry/2017/01/01/175228
I did it
Today’s theme
Debug
Debugging method • Using var_dump, echo • php -a •
Writing tests • IDE • etc…
Debugging method • Using var_dump, echo • php -a •
Writing tests • IDE • etc…
Using REPL (php -a) • Easy to use • Can
load files • Good integration with CLI
Is it the best way? • Bother to require autoloader
• Reset state every time • Not good for many autoloader files…
None
psysh http://psysh.org/
psysh • Rich CLI • Customizable • We can make
own REPL
Rich REPL • Auto complete (with Tab key) • Useful
commands • history, documentation, show properties • Rich UI
Customizable • We can place config file • ~/.config/psysh/psysh.php •
We can do anything if PHP can
<?php // Automatically autoload Composer dependencies if (is_file(getcwd() . '/vendor/autoload.php'))
{ require_once(getcwd() . '/vendor/autoload.php'); } Load composer automatically
<?php // Use local config, if available if (is_file(getcwd() .
'/.psysh.php')) { return require(getcwd() . '/.psysh.php'); } // Fall back to global config return [ 'startupMessage' => '<info>Using global config</info>', 'commands' => [ new \Psy\Command\ParseCommand, ], ]; Load local config
<?php $default_includes = []; // Automatically autoload Composer dependencies if
(is_file(getcwd() . '/vendor/autoload.php')) { $default_includes[] = getcwd() . '/vendor/autoload.php'); } if (array_pop(explode('/', getcwd())) === '') { $default_includes[] = getcwd() . 'lecacy_autoloader.php'; } return [ 'defaultIncludes' = $default_includes, ]; Legacy project? No problem☺
Thank you