# Can I use the PHP SDK on a plain PHP app with no framework?

Asked by devon_82 on 2026-08-12. Tags: php, slots, versioning.

Legacy app here. Plain PHP, no Laravel or Symfony anywhere and no plan to add
one. I want to render one personalized slot server-side.

Every example points at a framework package. Does the core SDK work on its own
and how do I fetch a slot safely without something blowing up the page.

## 2 answers

### Answer from mkaminski (2026-08-13)

Yes, the core PHP SDK works standalone. The Laravel, Symfony, and Drupal
packages are convenience layers on top of it, so on a plain app you just use the
core one directly, no framework required.

The thing to get right is the fallback. Fetch the slot content server-side and
pass a fallback so a failed request returns the default instead of throwing.
Content resolves server-side, so there is no client flicker either way, the HTML
goes out already personalized. The [Laravel server-side SDK](/answers/php-laravel-server-side-sdk)
thread shows the same fetch-with-fallback shape if you want a fuller example,
the core call is the same minus the framework glue.

### Answer from Sam Okafor (2026-08-14)

One thing to pin down before you ship: the slot version. Use a versioned slot
ID like `home-hero@2`. If you omit the version you get latest, which means a
later publish that changes the slot schema can silently drift out from under
your code and break the page.

Pin it explicitly. Then a new version only reaches you when you bump the number,
not the moment someone hits publish in the dashboard.

#### Reply from devon_82 (2026-08-14)

Good call on the pinned version, was about to leave it off. Core package it
is
