2108 solutions found
Page 12 of 106votes
To find the number of elements in a PHP `$array`, which is [faster/better/stronger][1]? `count($array)` or `sizeof($array)` ? Edit ---- Thanks to Andy...
votes
I'm trying to build a list of functions that can be used for arbitrary code execution. The purpose isn't to list functions that should be blacklisted or...
votes
Simple question, but the answer seems quite hard to come by. In Codeigniter, I could load the URL helper and then simply do echo base_url(); to get my...
votes
I have a html form which has a select list box from which you can select multiple values because its multiple property is set to multiple. Consider form method...
votes
I'm trying to build a PHP site and I'm wanting to test my PHP files without uploading them to my host. Basically testing them on my own machine before I...
votes
I need to have a class constructor in PHP call its parent's **parent's** (grandparent?) constructor without calling the parent constructor. // ma...
votes
I try to use PHPMailer to send registration, activation. etc mail to users: require("class.phpmailer.php"); $mail -> charSet = "UT...
votes
I've installed PHP 7 using [this repo][1], but when I try to run ``composer install``, it's giving this error: > - [package] requires ext-curl * -...
votes
I would like to know the difference between `require` and `require-dev`. The composer website doesn't offer a good explanation the difference between thes...
votes
What is the best way to accomplish this?
votes
I have this PHP code: function ShowFileExtension($filepath) { preg_match('/[^?]*/', $filepath, $matches); $string = $match...
votes
Recently I've read about namespaces and how they are beneficial. I'm currently creating a project in Laravel and trying to move from class map autoloadi...
votes
I'm trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me). $profile = "...
votes
I'd like to see what the post fields in the request are before I send it. (For debugging purposes). The PHP library (class) I am using is already made (n...
votes
We need to see what methods/fields an object has in Javascript.
votes
I realise the second one avoids the overhead of a function call (**update**, is actually a language construct), but it would be interesting to know if one is be...
votes
I want to get visitors country via their IP... Right now I'm using this (http://api.hostip.info/country.php?ip=...... ) Here is my code: <?php...
votes
I'm wondering what the difference between .phtml and .php files is, and when to use one over the other.
votes
I have a simple PHP script that I am attempting a cross-domain CORS request: <?php header("Access-Control-Allow-Origin: *"); heade...
votes
I have searched high and low and get a lot of different solutions and variables containing info to get the absolute path. But they seem to work under some cond...