php-5.6

PHP: Performance: splat operator or reflection

时光毁灭记忆、已成空白 提交于 2021-02-20 19:27:28
问题 In an app that I'm creating, I need to pass an unknown number of parameters to an unknown constructor of a class. The class (+ namespace) is a string, that is in $class. The parameters are in an array. This application will be deployed over a couple of months, so we thought we could develop it already in PHP 5.6. So I thought that the solution of this would be: $instance = new $class(...$args); This is working... But my collegues don't want to accept this, because the CI server does not

Anyone tested Codeigniter 2.2 on php 5.6?

不羁的心 提交于 2021-01-27 21:04:09
问题 just curious to know, has anyone tested CodeIgniter application on PHP 5.6? We are upgrading our server from 5.3.3 to 5.6 currently running CodeIgniter 2.2 . Will that be fine? if yes, I would really appreciate if you post your feedback what performance change you have encountered 回答1: I have a live site using CI 2.1.3 with php 5.6 that has been running smoothly for more than a year (maybe longer). No CI related problems that I can recall. 来源: https://stackoverflow.com/questions/40051122

Fopen accept self signed certificate

折月煮酒 提交于 2020-05-29 04:00:48
问题 i would like to get the result of my page in https in a php variable but the fopen fonction return false; i think this error can be product by the ssl certifacte which is self signed fopen("https://192.168.1.1:8443", "rb")) Warning: fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Is it a php ssl configuration to accept all certificate ? 回答1: see Error when loading external xml file with php

Composer/Laravel install package from existing files when external repository no longer exists

独自空忆成欢 提交于 2020-03-22 06:28:53
问题 I have the following problem: I have an old project which uses Laravel 4.2, PHP 5.5.9 and Composer. I'm trying to set it up on a different computer (With Laravel 4.2.2 and PHP 5.6) but one of the required packages has a dependency which is missing because whoever was managing that GitHub account decided to remove it. Thus, the required package can't be installed via Composer. Now, the old project has these packages downloaded and I can copy both of them manually. What I don't know, is how to

Composer/Laravel install package from existing files when external repository no longer exists

点点圈 提交于 2020-03-22 06:28:32
问题 I have the following problem: I have an old project which uses Laravel 4.2, PHP 5.5.9 and Composer. I'm trying to set it up on a different computer (With Laravel 4.2.2 and PHP 5.6) but one of the required packages has a dependency which is missing because whoever was managing that GitHub account decided to remove it. Thus, the required package can't be installed via Composer. Now, the old project has these packages downloaded and I can copy both of them manually. What I don't know, is how to

Date function in PHP gives always date one day behind

有些话、适合烂在心里 提交于 2020-01-16 00:50:30
问题 My situation is that get always the dates one day behind. For example, I have this value -243219600 which is relative to date 18/04/1962 After a date('d/m/Y', -243219600); Output is : 17/04/1962 -243219600 seconds from January 1 1970 00:00:00 UTC in javascript is here you get correct Date. 回答1: The output of date() depends on the configured time zone. If you add the time and timezone, you can see it. In my case it is CET: echo date('d/m/Y H:m:i T', -243219600); //prints: 18/04/1962 00:04:00