Skip to main content

Questions tagged [php]

This challenge is related to the PHP language. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
148 views

Some built-in functions in PHP return mixed types, like file_get_contents that returns both string or ...
Olle Härstedt's user avatar
5 votes
1 answer
266 views

If you consider the following PHP+C polyglot snippet, there is a problem regarding class property access in the printf call: ...
Olle Härstedt's user avatar
16 votes
3 answers
2k views

I've tried this question on two forums and have been told this is the best place for this type of question. I'm trying to print from 0 to 1000 then back to 0 again (and all numbers in-between), ...
dev's user avatar
  • 171
1 vote
0 answers
355 views

I got inspired by this: Print every character your program doesn't have But with the exception that the letters have to be between ASCII 32 to 126. We started fooling around with it at the office ...
sleepless_in_seattle's user avatar
6 votes
3 answers
2k views

NOTE: This question was migrated from https://stackoverflow.com/q/27134588/1442685 PHP QUESTION Almost purely out of curiousity, how can I take an array like this: ...
Rick Buczynski's user avatar
-4 votes
1 answer
8k views

I have this function to generate UUID's: ...
Ismael Miguel's user avatar
8 votes
3 answers
2k views

I have been participating in a number of PHP code golf challenges recently and some of the techniques that are used to read data from a file such as fopen() and <...
Dan Prince's user avatar
  • 1,467
40 votes
40 answers
12k views

What general tips do you have for golfing in PHP? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to PHP (e.g. "remove comments" is not ...
JiminP's user avatar
  • 3,472
4 votes
2 answers
1k views

PHP has closures, let's play around with them. I have some arrays similar to, $wannabelist = array (1, 2, 3, 4, 5, 6). I want to do this: ...
cbrandolino's user avatar