php-5.3 Questions
1
Solved
I think I have reached the limit for crypt($string) at 72 chars. Here is the code:
<?php
$p = '0123456789abcdefghij0123456789abcdefghij0123456789abcdefghij0123456789++';
var_dump($p);
$salt =...
4
Solved
I'm considering the idea of a browser-based PHP IDE and am curious about the possibility of emulating the command line through the browser, but I'm not familiar enough with developing tools for the...
Fantail asked 19/7, 2012 at 5:33
1
Solved
I have written some code that I run remotely on a server via the php-cli and a particular method within this code (I'm unsure which method at the moment) is causing a segmentation fault.
Apart fro...
4
Solved
The function signature on PHP.net for array_replace() says that the arrays will be passed in by reference. What would be the reason(s)/benefit(s) to doing it this way rather than by value since to ...
3
Solved
Can any one tell what does below given lines means?
The lines below are copied from PHP manual:
Note:
It is not possible to use overloaded properties in other language
constructs than isset...
2
Solved
Is it possible to do the following?
register_shutdown_function('my_shutdown');
function my_shutdown ()
{
file_put_contents('test.txt', 'hello', FILE_APPEND);
error_log('hello', 3, 'test.txt');
}...
1
Solved
I am using a shared hosting environment and the default memory limit for PHP is 32M. I am facing some problems with Concrete5 setup.
When I try to sign into the admin panel of Concrete5, it gives...
1
Solved
I have the below HTML string, and I would like to turn it into an array.
$string = '
<a href="#" class="something">1</a>
<a href="#" class="something">2</a>
<a href="#" ...
Ra asked 28/4, 2012 at 18:42
1
Solved
This is a follow-up question about how to process prefixed messages received from a network socket. What I try to do is:
Read the first 4 bytes (which is the $prefix and represents the length of ...
Patchy asked 17/3, 2012 at 2:12
1
Solved
As I understand, it is possible to create a nonblocking network socket in PHP 5.x.
But what happens if a script sends several long messages using the same nonblocking socket as follow:
socket_wr...
Ferullo asked 16/3, 2012 at 15:9
1
Solved
call_user_func('array_pop', $myarray);
gives 'Parameter 1 to array_pop() expected to be a reference, value given', while
call_user_func('array_pop', &$myarray);
gives 'Call-time pass-by-r...
1
Solved
I'm trying to accomplish this without requiring a function on the child class... is this possible? I have a feeling it's not, but I really want to be sure...
<?php
class A {
public static func...
Littleton asked 6/3, 2012 at 4:40
2
Solved
In the ReflectionMethod documentation, I can't find anything to know wether a method was inherited from its parent class or defined in the reflected class.
Edit: I use ReflectionClass::getMethods(...
Incommunicado asked 27/2, 2012 at 20:34
2
Solved
Using Magentos collection models, how should I go about adding a query part/filter such as this:
WHERE (main_table.x < 1 OR (main_table.x - main_table.y) >= 5)
Update
I'm now running this:...
Fleabane asked 22/2, 2012 at 21:12
1
Solved
I've run into a problem with PHP 5.3 namespacing and Doxygen comments.
Example:
/**
* Sample Method
*
* @param string $output
* @return \Project\Lib\Rest
*/
Doxygen gives me the following ...
1
Solved
I have a class that sets up a class alias for other class names. When a function is called inside of this class via the aliased class, I need to know which alias was used. Is there a way to do this...
4
Solved
I am experiencing a rather strange problem using PHP 5.3's date diff function to calculate the difference in days between two dates. Below is my code:
$currentDate = new DateTime(); // (today's da...
1
Solved
1
Solved
I'm starting to use functional programming paradigms in php and was wondering what the performance impacts are. Some googling just seems to say that there are some. To be specific, I would li...
Southing asked 30/12, 2011 at 6:39
2
Solved
class A
{
static $v = "A";
static function echoExtendedStaticVariable() {
echo self::$v;
}
}
class B extends A
{
static $v = "B";
// override A's variable with "B"
}
Why does:
echo B::$v...
Educative asked 20/12, 2011 at 20:21
1
Solved
I'm wondering whether functions like strip_tags() and trim() UTF-8 aware?
I found this on the web, but I'm not sure about it:
strip_tags(): multi-byte UTF-8 characters contain no byte sequences th...
3
Solved
Is there any good log library for message, warning and errors flogging for PHP?AFAIK error_log is only used for logging errors but i need to store also debug messages.
And should work with C...
3
Solved
I am looking for fast and good way to add "-" before every word in string. For example "bla bla bla" should become "-bla -bla -bla".
I don't want to make an array of this string, then map it, etc. ...
2
Solved
I have a php script that uses Doctrine2 and Zend to calculate some things from a database and send some emails for 30.000 users.
My script is leaking memory and I want to know which are the object...
Chiropteran asked 5/10, 2011 at 23:30
3
Solved
I'm going to buy a (cheap) hosting space with apache/php 5/mysql. Because it's cheap i have no direct control over php.ini and extension loading.
My question is: can i load an extension putting th...
Incommodity asked 7/10, 2011 at 15:23
© 2022 - 2024 — McMap. All rights reserved.