undefined function json_decode

Answered

when i try to use json_decode,my phpstorm  tell me undefined function json_decode?

why

7 comments
Comment actions Permalink

Solved, but how?

0
Avatar
Vladimir Luchansky
Comment actions Permalink

@George Did you encounter the same issue? Is File | Settings | Languages & Frameworks | PHP > PHP Runtime > Bundled > json enabled?

0
Comment actions Permalink

Thanks for the help/hint. I got the same in PhPStorrm. Fixed with:

  1. Menu: File / Settings / PHP / Tab: PHP Runtime / Button:  Sync Extensions with Interpreter
  2. Menu: File / "Invalidate Caches / Restart..."

It's strange that json_decode() started showing up as unknown this morning. All I did was get the bash update.

 

 

0
Comment actions Permalink

My PHPStorm has smae problem started today sfter update from 2020.1 to 2020.2.

I tried your step but not help. And it looks PHPStorm lost references to all php extensions.

0
Comment actions Permalink

@Standus

Please check https://youtrack.jetbrains.com/issue/WI-54626 -- you may need to delete caches folders manually (when IDE is closed)

1
Comment actions Permalink

I found what is the problem. After disable plugin "PHP Document 1.1" https://github.com/fw6669998/php-doc then its OK.

0

Please sign in to leave a comment.