★ Petty Evals
syntax

Arrow fns or full closures (PHP)?

CLOSURE
1 arrow · 2 closure · 1 mixed

A real fight. Scroll for the dunks.

The exact prompts I used (3 variants)

Each model got each prompt 20 times (2 temperatures × 10 runs). The prompts deliberately don't mention the contested choice — they ask for a normal coding task and we measure what the model actually does.

  1. Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).
  2. Write a PHP function that uses `array_filter` to return only the active users from an array of user objects.
  3. Write a PHP function that uses `usort` to sort an array of products by price ascending.

Who said what

Claude Sonnet 4.6
claude-sonnet-4-6
ARROW
67% confidence (95% CI: 54–77%)
GPT-5.4
gpt-5.4
CLOSURE
100% confidence (95% CI: 94–100%)
GPT-5.4 mini
gpt-5.4-mini
CLOSURE
90% confidence (95% CI: 80–95%)
Gemini 2.5 Pro
gemini-2.5-pro
MIXED
77% confidence (95% CI: 65–86%)

The pundit panel.

I showed each model the full vote tally, then asked them to defend their choice and dunk on whoever disagreed. Receipts attached.

Claude Sonnet 4.6
voted ARROW

“When your peers can't even pick a lane between `function() {}` and `fn() =>`, maybe the real bug is in their decision-making, not the classifier.”

GPT-5.4
voted CLOSURE

“Calling this a style verdict is generous; between Claude freestyling arrows and Gemini shrugging “mixed,” the evaluator basically graded PHP vibes with a blindfold on.”

GPT-5.4 mini
voted CLOSURE

“Claude went arrowhead-first, Gemini straddled the fence, and the classifier apparently read the whole thing through a toaster.”

Gemini 2.5 Pro
voted MIXED

“Given the wildly inconsistent output from my peers, I'm amazed the classifier didn't just return a segmentation fault.”

Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → arrow
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
## Convert Cents to Dollars Using `array_map`

### Basic Implementation

```php
<?php

/**
 * Converts an array of prices from cents to dollars.
 *
 * @param int[] $prices Array of prices in cents
 * @return float[] Array of prices in dollars
 */
function convertCentsToDollars(array $prices): array
{
    return array_map(fn(int $cents): float => $cents / 100, $prices);
}
```

### Usage Examples

```php
<?php

// Basic usage
$pricesInCents = [199, 999, 1499, 2999, 10000];
$pricesInDollars = convertCentsToDollars($pricesInCents);

print_r($pricesInDollars);
/*
Array
(
    [0] => 1.99
    [1] => 9.99
    [2] => 14.99
    [3] => 29.99
    [4] => 100
)
*/

// Format as currency strings
$formatted = array_map(
    fn(float $price): string => '$' . number_format($price, 2),
    $pricesInDollars
)
…
variant 0 · temp 0 · run 1 · → arrow
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
## Convert Cents to Dollars Using `array_map`

### Basic Implementation

```php
<?php

/**
 * Converts an array of prices from cents to dollars.
 *
 * @param int[] $prices Array of prices in cents
 * @return float[] Array of prices in dollars
 */
function convertCentsToDollars(array $prices): array
{
    return array_map(fn(int $cents): float => $cents / 100, $prices);
}
```

### Usage Examples

```php
<?php

// Basic usage
$pricesInCents = [199, 999, 1499, 2999, 10000];
$pricesInDollars = convertCentsToDollars($pricesInCents);

print_r($pricesInDollars);
/*
Array
(
    [0] => 1.99
    [1] => 9.99
    [2] => 14.99
    [3] => 29.99
    [4] => 100
)
*/

// With formatted output
$formatted = array_map(fn(float $price): string => '$' . number_format($price, 2), $pricesInDollars);

print_r($for
…
variant 0 · temp 0 · run 2 · → arrow
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
## Convert Cents to Dollars Using `array_map`

### Function

```php
<?php

/**
 * Converts an array of prices from cents to dollars.
 *
 * @param int[] $prices Array of prices in cents
 * @return float[] Array of prices in dollars
 */
function convertCentsToDollars(array $prices): array
{
    return array_map(fn(int $cents): float => $cents / 100, $prices);
}
```

### Usage Examples

```php
<?php

// Basic usage
$pricesInCents = [199, 999, 1499, 2999, 10000];
$pricesInDollars = convertCentsToDollars($pricesInCents);

print_r($pricesInDollars);
/*
Array
(
    [0] => 1.99
    [1] => 9.99
    [2] => 14.99
    [3] => 29.99
    [4] => 100
)
*/

// Format as currency strings
$formatted = array_map(fn(float $price) => '$' . number_format($price, 2), $pricesInDollars);

print_r($formatted);
/*
Arr
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → closure
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
<?php

function centsToDollars(array $pricesInCents): array {
    return array_map(function ($price) {
        return $price / 100;
    }, $pricesInCents);
}

// Example usage:
$prices = [199, 2500, 999];
$dollars = centsToDollars($prices);

print_r($dollars);
```

Output:
```php
Array
(
    [0] => 1.99
    [1] => 25
    [2] => 9.99
)
```
variant 0 · temp 0 · run 1 · → closure
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
<?php

function centsToDollars(array $pricesInCents): array
{
    return array_map(function ($price) {
        return $price / 100;
    }, $pricesInCents);
}

// Example:
$prices = [199, 2500, 999];
$result = centsToDollars($prices);

print_r($result);
// Output: Array ( [0] => 1.99 [1] => 25 [2] => 9.99 )
?>
```
variant 0 · temp 0 · run 2 · → closure
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
<?php

function centsToDollars(array $pricesInCents): array {
    return array_map(function ($price) {
        return $price / 100;
    }, $pricesInCents);
}

// Example usage
$prices = [199, 2500, 999];
$dollars = centsToDollars($prices);

print_r($dollars);
```

Output:
```php
Array
(
    [0] => 1.99
    [1] => 25
    [2] => 9.99
)
```

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 mini — 60 samples click to expand
variant 0 · temp 0 · run 0 · → closure
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
function centsToDollars(array $pricesInCents): array {
    return array_map(function ($cents) {
        return $cents / 100;
    }, $pricesInCents);
}
```

Example:

```php
$prices = [250, 499, 1250];
$dollars = centsToDollars($prices);

print_r($dollars);
// Array ( [0] => 2.5 [1] => 4.99 [2] => 12.5 )
```
variant 0 · temp 0 · run 1 · → arrow
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
function centsToDollars(array $pricesInCents): array
{
    return array_map(fn($cents) => $cents / 100, $pricesInCents);
}
```

Example:

```php
$prices = [199, 250, 999];
$dollars = centsToDollars($prices);

print_r($dollars);
// Array ( [0] => 1.99 [1] => 2.5 [2] => 9.99 )
```
variant 0 · temp 0 · run 2 · → closure
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
```php
<?php

function convertCentsToDollars(array $pricesInCents): array
{
    return array_map(function ($cents) {
        return $cents / 100;
    }, $pricesInCents);
}

// Example:
$prices = [125, 250, 999];
$dollars = convertCentsToDollars($prices);

print_r($dollars);
```

This will return:

```php
Array
(
    [0] => 1.25
    [1] => 2.5
    [2] => 9.99
)
```

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

Gemini 2.5 Pro — 60 samples click to expand
variant 0 · temp 0 · run 0 · → mixed
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
Of course! Here is a PHP function that uses `array_map` to convert an array of prices from cents to dollars, along with explanations and examples.

The most common and modern way to do this is with an anonymous function (a closure) as the callback.

### 1. Using an Anonymous Function (Most Common)

This is the recommended approach for simple, one-off operations like this.

```php
<?php

/**
 * Converts an array of prices in cents to an array of prices in dollars.
 *
 * @param int[] $centsArray An array of integers representing prices in cents.
 * @return float[] A new array with each price converted to dollars.
 */
function convertCentsToDollars(array $centsArray): array
{
    return array_map(function($cents) {
        return $cents / 100;
    }, $centsArray);
}

// --- Example Usage ---

…
variant 0 · temp 0 · run 1 · → mixed
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
Of course! Here is a PHP function that uses `array_map` to convert an array of prices from cents to dollars, along with explanations and examples.

The most common and modern way to do this is with an anonymous function (a closure) as the callback.

### 1. Using an Anonymous Function (Most Common)

This is the recommended approach for simple, one-off operations like this.

```php
<?php

/**
 * Converts an array of prices in cents to an array of prices in dollars.
 *
 * @param int[] $centsArray An array of integers representing prices in cents.
 * @return float[] A new array with each price converted to dollars.
 */
function convertCentsToDollars(array $centsArray): array
{
    return array_map(function($cents) {
        return $cents / 100;
    }, $centsArray);
}

// --- Example Usage ---

…
variant 0 · temp 0 · run 2 · → mixed
Prompt

Write a PHP function that uses `array_map` to convert an array of prices in cents to dollars (divide each by 100).

Response (first 800 chars)
Of course! Here are a few ways to write that function, starting with the most common approach.

### 1. Using an Anonymous Function (Most Common)

This is the standard and most compatible way to use `array_map` for a custom operation. It works on PHP 5.3 and later.

```php
/**
 * Converts an array of prices in cents to an array of prices in dollars.
 *
 * @param int[] $centsArray An array of integers representing prices in cents.
 * @return float[] An array of floats representing prices in dollars.
 */
function convertCentsArrayToDollars(array $centsArray): array
{
    return array_map(function($cents) {
        return $cents / 100;
    }, $centsArray);
}

// --- Example Usage ---

// Input array with prices in cents
$pricesInCents = [150, 2000, 99, 12345, 50];

// Call the function to conv
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

How I did this (the actual nerd shit)

For each of 4 models I ran 3 prompt variants at two temperatures (0.0 and 0.7), 10 runs each — 240 code samples total, cost $2.76.

Each output got fed through a fight-specific regex classifier. For arrow-fn-vs-closure-php the classifier looks for the specific signal in the output (see the source — there's one function per fight, ~30 lines each). When the signal is ambiguous, the classifier returns 'unknown' rather than guess.

Each model's vote = its modal classification across 60 runs. Confidence = Wilson 95% CI. Verdict = majority across models (ties reported as ties). Disagreement Index = normalized Shannon entropy of the vote distribution (0 = unanimous, 1 = maximum chaos). Leaderboard sorts by this.

The pundit quotes come from a follow-up call after the votes are in — each model gets the full tally and a per-model judgy prompt. I never edit the quotes.

Full walkthrough: the methodology page. Source: GitHub.

Got a pettier debate?

Open a PR with a new fight. I'll run it across all four models, write up the verdict, and add your name to the byline.

Submit via PR →