Skip to content

Tag: php

mcrypt is deprecated, what is the alternative?

The mcrypt-extension is deprecated will be removed in PHP 7.2 according to the comment posted here. So I am looking for an alternative way to encrypt passwords. Right now I am using something like I need your opinion for the best/strongest way to encrypt passwords, the encrypted password should of course supp…

Fastest way to check key exists in redis – php

Is there any other faster way than EXISTS, to check if a key exists in redis or not? My problem is, I have over 1 million records in redis and I need to do a key_exists check. This should happen within 10ms. Any Ideas around this? Answer Using the EXISTS command is the fastest way, this should be extremely qu…

Laravel Blade compileString gives me a Blank Page

I tried to create a new blade directive in my AppServiceProvider: And then call this directive in my view: @test() But it’s not work and gives me a blank page. Answer i try several things but finally i fix this by copy and paste blade directive code from BladeCompiler.php to my custom directive instead …

Uncaught Error: Call to a member function fetchAll() on boolean

index.php: and get the error : Db.php If I running in the sql() method, execute() and fetch() the data inside it , it can truly get the data , but put the execute() and fetch() to the query() method, getting the error message, Any Idea? ; Answer There is an error in your code. In this line: The execute() meth…