我正在寻找一种方法(正则表达式、代码片段、插件等)将旧数组转换为带有 sublimeText 的新 php 语法。
// Old synthax
$var = array(
'foo' => 'bar'
);
// New synthax
$var = [
'foo' => 'bar'
];
有人有想法吗?
最佳答案
我找到了一个完美完成工作的脚本!
https://github.com/thomasbachem/php-short-array-syntax-converter
关于php - 使用新语法转换 php 数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24017895/