
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
php-serialize
Advanced tools
PHP-Serialize is tiny library that helpers you encode/decoded data in PHP's Serialization format.
It also supports Serializable
objects decode. Here's how you can use them. (Note: This example uses ES6)
let Serialize = require('./Main')
class User{
constructor(Info){
this.Name = Info.Name
this.Age = Info.Age
}
serialize(){
return JSON.stringify({Name: this.Name, Age: this.Age})
}
unserialize(Data){
Data = JSON.parse(Data)
this.Name = Data.Name
this.Age = Data.Age
}
}
let Steel = new User({Name: "Steel Brain", Age: 16})
let Serialized = Serialize.serialize(Steel)
let Unserialized = Serialize.unserialize(Serialized, {User: User}) // Passing available classes
console.log(Unserialized instanceof User) // true
class Serializable{
serialize(Item): string
unserialize(Item, Scope = {})
}
This project is licensed under the terms of MIT License. See the License file for more info.
FAQs
PHP serialize/unserialize in Javascript
The npm package php-serialize receives a total of 32,284 weekly downloads. As such, php-serialize popularity was classified as popular.
We found that php-serialize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.