qmetrics.net

VarExporter

Symfony PHP object export clone and lazy-load tools

Frameworks & PlatformsDesktop/CLI app
VarExporter screenshot

VarExporter is a Symfony component for exporting, instantiating, hydrating, cloning, and lazy-loading PHP objects. Install it with Composer in PHP projects.

Overview

VarExporter provides utilities that work with the internal state of PHP objects. VarExporter::export turns serializable data structures into plain PHP code while preserving PHP serialization semantics such as __wakeup, __sleep, and related interfaces.

DeepCloner deep-clones values while keeping copy-on-write behavior for strings and arrays, which can be faster and more memory efficient than unserialize(serialize()). For lazy loading, ProxyHelper::generateLazyProxy builds decorator proxies for abstract or internal classes and interfaces when native lazy objects are not sufficient.

The component can use the ext-deepclone extension for performance, or a polyfill fallback. The extension also exposes deepclonehydrate for hydrating objects without calling constructors, including private, protected, and readonly properties.

Compared with serialize or igbinary, export output runs faster under OPcache than unserialization. Output is PSR-2 compatible, re-indentable without breaking embedded newlines, and missing classes raise ClassNotFoundException instead of incomplete class objects. The package is widely pulled in by Symfony-based applications and other PHP ecosystems via Composer.

Key features

  • Export serializable data to PHP code
  • Deep clone with copy-on-write preservation
  • Lazy proxy generation for interfaces
  • Native lazy object helpers for PHP 8.4+
  • deepclone extension or polyfill support
  • Hydrate without calling constructors
  • PSR-2 compatible export output
  • Stricter behavior on missing classes

Use cases

  • Caching warmed PHP data structures
  • Efficient repeated deep copies
  • Lazy-loaded domain object graphs
  • Symfony framework component usage
  • Faster reload than serialize in OPcache

Tags

Similar software

ECC

Open-source agent engineering toolkit for coding harnesses

ECC adds planning, verification, review, memory, skills, and security scanning to coding agents such as Claude Code, Codex, and Cursor. It installs as plugins, packages, and managed adapters across multiple harnesses.

★ 311.7k⟳ 8 days agoMIT
Frameworks & PlatformsDesktop/CLI app

React

JavaScript library for web and native user interfaces

React helps developers build interfaces from reusable components that manage their own state. Views update declaratively when underlying data changes.

★ 253k⟳ 2 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Flutter

Open-source UI framework for multi-platform apps from one codebase

Flutter is an SDK for building user experiences for mobile, web, and desktop from a single codebase. It uses the Dart language and compiles to native machine code or web targets.

★ 181.5k⟳ todayBSD-3-Clause
Open Source Alternative to:Ionic Enterprise

Bootstrap

Responsive HTML, CSS, and JavaScript front-end toolkit

Bootstrap supplies CSS, JavaScript, and Sass-based styles for building responsive, mobile-first sites. It ships prebuilt grid layouts, UI components, and optional JavaScript plugins.

★ 175.1k⟳ 2 days agoMIT

Langflow

Visual low-code builder for AI agents and workflows

Langflow is a visual builder for AI agents and workflows. Flows can be customized in Python and deployed as an API or as an MCP server, with support for major LLMs and vector databases.

★ 157k⟳ todayMIT
Open Source Alternative to:Relevance AIVoiceflow

LangChain

Framework for agents and LLM-powered applications

LangChain helps developers chain interoperable components and integrations to build agents and LLM-powered applications. It offers a standard interface for models, embeddings, vector stores, and related pieces.

★ 150.1k⟳ 2 days agoMIT