In node.js, I use the build in function to encrypt data like that:
var text = \"Yes\";
var password = \"123456\";
var encrypt = crypto.createCipher(\'aes-256
I have another working example in this other post if it helps for anyone else.
If you make sure you use an 32 characters length "key/secret" and a 16 characters length IV in both PHP and Node, and base64 encryption encoding and utf8 message encoding in Node, then you should not have any issues with any differences in the padding schema.
Regards, Ignacio