Written by James McDonald

May 9, 2017

PHP Install on Mac

I use CakePHP 2 and 3 so they need intl and mcrypt

brew install php71 --with-httpd24
brew install php71-imagick
brew install php71-intl
brew install php71-mcrypt

Also I found that calling a function as follows fails

# this PHP 5.x code calls a function name stored in $recieved['operation'] 
# called create_pdf
# However this fails in PHP 7.1
$result = $this->$received['operation']($received);

# the solution is to first
# assign the function name to a variable 
$func = $received['operation'];

# and then it will work successfully when called
$result = $this->$func($received);

 

 

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...