The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1
vote
0answers
282 views

Trying to optimize a solution to a puzzle with PHP [closed]

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 ...
5
votes
3answers
1k views

Shortest Code to Translate a PHP array

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: ...
-3
votes
1answer
7k views

Shortest way to generate UUID's version 3,4 and 5 in php

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

PHP golfing tips: Reading/writing files and the CLI

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 <...
37
votes
39answers
7k views

Tips for golfing in PHP

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 ...
6
votes
2answers
1k views

“list comprehension” in php.

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: ...