php-5.3 Questions
2
Solved
Take a look at this example, and notice the outputs indicated.
<?php
class Mommy
{
protected static $_data = "Mommy Data";
public static function init( $data )
{
static::$_data = $data;
...
Biller asked 2/1, 2011 at 4:51
6
Solved
What is the difference between using self and static in the example below?
class Foo
{
protected static $bar = 1234;
public static function instance()
{
echo self::$bar;
echo "\n";
echo sta...
8
Solved
I get a really strange, pointless and totally random error when I fetch rows from a resource (query) using PHP.
My development machine is a Windows XP SP3 with Apache 2.2 while MySQL runs on a vir...
2
Solved
I am trying to use the normalizer_normalize() function introduced in PHP 5.3 (says the doc), however I can't use it:
$ php -r 'echo normalizer_normalize("tést");'
PHP Fatal error: Call to undefine...
Gama asked 21/1, 2012 at 0:32
7
Solved
Hello I am making this call:
$parts = $structure->parts;
Now $structure only has parts under special circumstances, so the call returns me null. Thats fine with me, I have a if($parts) {...} la...
Covin asked 13/4, 2012 at 14:54
4
Solved
My goal is to print an updating progress percentage to the console (in both Linux and Windows). Currently I just print out the percentage each 10%, but I would prefer that it updated itself every 1...
Steels asked 22/5, 2011 at 18:54
3
Solved
I want to replace the horizontal ellipse (…) with three period (...)in a given string.
Till now I have tried are:
str_replace('…','...', $text);
str_replace('&#8230;', '...', $text);
str_repla...
5
Solved
This is a sort of general inquiry I've been wondering about. I've noticed a lot of this through other people's code, and never really knew the actual reason, just followed the trends, so here goes....
Church asked 23/4, 2011 at 18:40
5
I have a question. I try to use datetime in php.
I did :
$now = new \DateTime();
When I print_r the $now I have :
DateTime Object
(
[date] => 2016-12-01 05:55:01
[timezone_type] => 3
[...
2
Solved
I need to convert the Emojis (e.g. 😀) in strings to their respective HTML code entities (e.g. &#128512;) on a PHP 5.3 site.
I need to do this so that user input gets properly stored in a lega...
Roomer asked 31/10, 2017 at 15:43
6
Solved
When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run ./configure I get this error:
configure: error...
Homburg asked 11/11, 2013 at 10:30
6
According to the PHPUnit Documentation on @expectedExceptionMessage, the string must only be a substring of the actual Exception thrown.
In one of my validation methods, an array item is pushed fo...
Boyla asked 6/9, 2013 at 0:3
3
Solved
Consider the following example quoted from php manual for DateTime
<?php
$date = new DateTime('2000-01-20');
$date->sub(new DateInterval('P10D'));
echo $date->format('Y-m-d') . "\n";
?...
7
Solved
How to fix the session_register() deprecated problem in PHP 5.3
Stratocumulus asked 10/9, 2010 at 6:23
4
Solved
i want to upload 2 image separately. i have a condition in which i need to upload file and some time bohth and some time only image i need to use separate button how to differentiate both image and...
Louvenialouver asked 7/4, 2016 at 6:48
4
Solved
I had a line - $autoload['libraries'] = array('database');, in CI's autoload.php. Because of this I was getting a blank page. When I removed the 'database', option then I started getting the output...
Dander asked 10/9, 2011 at 7:52
10
Solved
I use composer on a network where the only way to access the internet is using HTTP or socks proxy. I have http_proxy and https_proxy environment variables. When compose tries to access HTTPS URLs ...
Symphony asked 25/6, 2013 at 21:10
4
Solved
I'm extending DateTime do add some useful methods and constants.
When using new to create a new object everything is fine but when using the static method createFromFormat it always returns the o...
Simplehearted asked 27/3, 2011 at 15:28
4
I successfully installed PHP 5.3.29 on Ubuntu 14 with Apache 2 separately.
I installed PHP with the following method:
sudo -i
wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
tar -xvf php...
Gelsenkirchen asked 3/3, 2015 at 2:48
4
Solved
I have some PHP code to calculate the number of days between two specific dates. The difference should not count Sundays and Saturdays. Also, I have an array of dates, which includes holidays, whic...
3
I am having problem to figure whenever I should send mail from the Model or the Controller. The thing is In the controller i use like
This is regarding PHP.
In Controller:
if (Post::get()){
$th...
Snug asked 16/2, 2011 at 14:2
3
Solved
I just got this Fatal Error
Catchable fatal error: Argument 1 passed to File::__construct() must be an instance of integer, integer given, called in /home/radu/php_projects/audio_player/index.ph...
Holily asked 2/2, 2013 at 17:58
3
Solved
I'm editing a PHP file in Netbeans that is not part of a project. Although I have PHP 5.3 installed, Netbeans complains about my use of a lambda function: "Language feature not compatible with PHP ...
Papist asked 23/6, 2011 at 16:43
3
Solved
$post_data="dispnumber=567567567&extension=6";
$url="http://xxxxxxxx.xxx/xx/xx";
I need to post this $post_data using cURL php with header application/x-www-form-urlencoded
i am new for curl ...
3
Solved
I'd like to model an Address as a value object. As it is a good practice to make it immutable, I chose not to provide any setter, that might allow to modify it later.
A common approach is to pass ...
Alevin asked 13/9, 2011 at 16:30
1 Next >
© 2022 - 2024 — McMap. All rights reserved.